From: email55555 email55555 Date: 2004-12-09T06:44:09+09:00 Subject: binding question I have this example codes: b = binding ['x', 'y'].each { |e| eval("#{e} = 123", b) } p local_variables p x p y Run the codes from irb, everything works. However, save it to a file like pgm.rb and ruby it as "ruby pgm.rb", I got the error message as: ["b", "x", "y"] #==> it does print the local_variables correctely. pgm.rb:4: undefined local variable or method 'x' for main:Object (NameError) Why? local_variables array does show me the "x", why it fail on "p x" ??