Skip to content

Commit

Permalink
makes find_to_state clearer in Stateflow::Transition removing ternary…
Browse files Browse the repository at this point in the history
… operator
  • Loading branch information
Pedro Menezes committed Mar 27, 2011
1 parent 030938b commit 5efbeb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/stateflow/transition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5efbeb1

Please sign in to comment.