From: Patrick Hurley Date: 2007-02-21T05:02:48+09:00 Subject: Re: adding local variables via block On 2/20/07, James Edward Gray II wrote: > eval() introduces a new scope, so local variables created in that > context do not leak into the calling scope: I am not recommending this, but you can force a binding into an eval. However, due to how the Ruby parser identifies local variables, they need to be referenced in "code" before you can use them normally. def foo(binding) eval("x = 42", binding) end foo(binding) x = x puts "x = #{x}" Good luck pth