Lets say you are using the if syntax for Ruby that goes like this:
if foo == 3: puts "foo"
elsif foo == 5: puts "foobar"
else puts "bar"
end
Is there a way to do it so Ruby executes two things in the if statement, say, like this:
if foo == 3
puts "foo"
foo = 1
elsif foo = ...
How can I make it so I can put two statements in using the first syntax?
casestatement instead, in this specific, er, case.theninstead of:to separate the condition from the actual expression.