From: Christian Surlykke Date: 2006-11-12T23:06:44+09:00 Subject: Create local variable in Binding after it's creation Hi, Is it possible to create a new local variable in a binding after it's creation? Specifically, what I'd like to do: l = lambda { puts a } # 'a' not defined at this point. eval('a = 7', l.binding) # Hope to create a in l's binding l.call # Hope to get '7' - but that produces: NameError: undefined local variable or method `a' for main:Object from (irb):1 from (irb):3:in `call' from (irb):3 from :0 Apparently, 'a' gets created in the scope from where 'eval' was called and not in 'l'''s binding. Any suggestions would be most welcome. best regards Christian Surlykke