This is the first stab at really implementing binding, and I'll be
committing it on my branch. It does its best to mimic what Ruby does
for bindings. As it turns out, bindings in C Ruby are just blocks
without code attached to them, and they're handled roughly the same.
The only major difference is that eval provides the code to run in a
binding...so in a sense a block is a binding plus a node to eval. No
problem.

This isn't perfect, but it allows most of the simple uses of binding
to work correctly. I also added TOPLEVEL_BINDING. This allows IRB to
run to the point where it needs trap and generate to run to a point
where there's a likely unrelated scoping problem. I think it's a good
baseline for binding impl, so I'm gonna run with it.

--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ jruby.sourceforge.net
Application Architect @ www.ventera.com

Attachment: binding3.patch
Description: Binary data

Reply via email to