On Mon, Oct 10, 2005 at 12:57:27PM +0900, Devin Mullins wrote: > Hal Fulton wrote: > > >No, this isn't April Fool's Day. I'm seriously wondering > >if this has ever been considered. > > Well, it's feasible now. > > http://onestepback.org/index.cgi/Tech/Ruby/RubyBindings.rdoc The eval("lambda{|x| #{lvar} = x}", somebinding).call(val) trick won't allow you to create new locals and refer to them normally. Taking the example from the OP: # hash is {:alpha => 1, :beta => 2, :x => 0} alpha = beta = nil # you can't get rid of this in the current implementation bind = binding hash.each_pair {|k,v| local_variable_set(k,v,bind) # we can use alpha & beta normally, but x requires eval("x") -- Mauricio Fernandez