some Boolean operators [...] in which the second argument is only executed or evaluated if the first argument does not suffice to determine the value of the expression.” ”Short-circuit operators are, in effect, control structures rather than simple arithmetic operators” http://en.wikipedia.org/wiki/Short-circuit_evaluation
some Boolean operators [...] in which the second argument is only executed or evaluated if the first argument does not suffice to determine the value of the expression.” ”Short-circuit operators are, in effect, control structures rather than simple arithmetic operators” http://en.wikipedia.org/wiki/Short-circuit_evaluation :foo && :bar #=> :bar
some Boolean operators [...] in which the second argument is only executed or evaluated if the first argument does not suffice to determine the value of the expression.” ”Short-circuit operators are, in effect, control structures rather than simple arithmetic operators” http://en.wikipedia.org/wiki/Short-circuit_evaluation :foo && :bar if :foo :bar end #=> :bar
some Boolean operators [...] in which the second argument is only executed or evaluated if the first argument does not suffice to determine the value of the expression.” ”Short-circuit operators are, in effect, control structures rather than simple arithmetic operators” http://en.wikipedia.org/wiki/Short-circuit_evaluation :foo && :bar if :foo :bar end #=> :bar :foo || :bar #=> :foo
some Boolean operators [...] in which the second argument is only executed or evaluated if the first argument does not suffice to determine the value of the expression.” ”Short-circuit operators are, in effect, control structures rather than simple arithmetic operators” http://en.wikipedia.org/wiki/Short-circuit_evaluation :foo && :bar if :foo :bar end #=> :bar :foo || :bar if :foo :foo else :bar end #=> :foo
"Could not find foo!" raise "Not ready!" unless ready_to_rock? ready_to_rock? or raise "Not ready!" => examples next if widget = widgets.pop widget = widgets.pop and next =>