Hi,

I am having some confusions about local variable assignments..

x + 1 # undefined local variable or method `x' for main:Object
(NameError)

But why not the same error happened in the below case ?

x = x+1
# undefined method `+' for nil:NilClass (NoMethodError)

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