From 5efbeb16a24440c44f15ae47c5dd8e1be333d942 Mon Sep 17 00:00:00 2001 From: Pedro Menezes Date: Sun, 27 Mar 2011 12:23:36 -0300 Subject: [PATCH] makes find_to_state clearer in Stateflow::Transition removing ternary operator --- lib/stateflow/transition.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/stateflow/transition.rb b/lib/stateflow/transition.rb index bc29d99..ac1d99f 100644 --- a/lib/stateflow/transition.rb +++ b/lib/stateflow/transition.rb @@ -22,7 +22,8 @@ def find_to_state(base) to = execute_action(@decide, base) - @to.include?(to) ? to : (raise NoStateFound.new("Decision did not return a state that was set in the 'to' argument")) + raise NoStateFound.new("Decision did not return a state that was set in the 'to' argument") unless @to.include?(to) + to end private