From: "Jan E." Date: 2012-09-11T00:14:49+09:00 Subject: Re: Why does it work? (variable scope) Hi, Local variables are determined purely by the existence of an assignment expression in the current scope. It doesn't matter if the assignment is ever executed. Also note that there's *no* difference between "if ... end" and "... if ..." with regard to the order of evaluation. In both cases the condition is evaluated first, and if it evaluates to true, the body is executed. -- Posted via http://www.ruby-forum.com/.