Here's a quick patch to add RubyBinding and make RubyKernel.eval
(actually RubyObject.eval) work correctly with it. It's pretty basic,
as you'd expect...just replaces the frame stack and class stack in the
current ThreadContext with the ones from when binding was called. I
couldn't find any specific Binding tests in Ruby, so I'll hunt around
more or commit one later.

def x
  str = "hello"
end

x_binding = x
eval "puts str", x_binding   => hello

- Charlie

Attachment: binding.patch
Description: Binary data

Reply via email to