Ruby has a peculiarity: when you define a variable in a conditional expression (if / unless / case / ternary if), it becomes visible from then on.
It's as if it was assigned nil before the conditional expression, and you don't need to explicitly declare it.
But if you define a variable in a block, it is defined in the local scope and is no longer visible outside the block.
#Ruby #Condition #ControlExpressions #If #Block #VariableDefenition #VariableScope
