From: Joseph McDonald Date: 2001-05-16T13:38:33+09:00 Subject: [ruby-talk:15237] RE: Bug or feature? eval("x=5") > This piece of code works as I expect. > > x = nil > eval("x=5") > puts x # 5 > > This one doesn't. > > eval("x=5") > puts x # Never heard of x! > > > Bug or feature? weirdness. It works in irb but not as a script: irb(main):001:0> eval("x=5") 5 irb(main):002:0> puts x 5 nil irb(main):003:0> -joe P.S. Should we be posting to both ruby-talk@ruby-lang.org; ruby-talk@netlab.co.jp or to just ruby-talk@ruby-lang.org ?