7stud -- wrote:
> Does the following not work as you would
> expect:
> 
> 
> if false
>     x = 10
> end
> 
> if x
>     puts "yep"
> else
>     puts "nope"
> end
> 

Ah.  I see what you are concerned about:

if y
    puts "yep"
else
    puts "nope"
end

undefined local variable or method `y' for main:Object (NameError)




-- 
Posted via http://www.ruby-forum.com/.