autovivification in Ruby?

Apr 13
2008
if false
 x = true
end
 
x.class #NilClass

Ruby declares the variable even if the assignment is not executed.

Comments are closed.

Calendar

April 2008
M T W T F S S
« Mar   May »
 123456
78910111213
14151617181920
21222324252627
282930  

Tags