I am writing something like REPL in Ruby and I need to define vars on the run. I figured it out that I should use eval, but here is excerpt from irb session to test it. In 1.9.3 (That would work in 1.8)
> eval 'a = 3'
=> 3
> a
=> NameError: undefined local variable or method `a' for main:Object
They changed it in 1.9 to:
> eval 'a = 3'
=> 3
> eval 'a'
=> 3
So seems like changed it since 1.9. How can I define vars in 1.9.3 using eval (or something similar)?