#812: Eval with binding is not able to retrieve local_variables
-------------------------------------+--------------------------------------
Reporter: eloy.de.en...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords: irb
-------------------------------------+--------------------------------------
{{{
$ cat t.rb
toplevel = :ok
p local_variables
p eval('local_variables', TOPLEVEL_BINDING)
b = Object.new.instance_eval { binding }
p b
eval('not_toplevel = :ok', b)
p eval('local_variables', b)
$ ruby19 t.rb
[:toplevel, :b]
[:toplevel, :b]
#<Binding:0x00000100864bf0>
[:not_toplevel, :toplevel, :b]
$ macruby t.rb
[:toplevel, :b]
[]
#<Binding:0x2000c5ea0>
[]
}}}
This is needed by dietrb in order to complete lvars or methods on a lvar.
--
Ticket URL: <http://www.macruby.org/trac/ticket/812>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel