Ticket #812 (new defect)
Eval with binding is not able to retrieve local_variables
| Reported by: | eloy.de.enige@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | blocker | Milestone: | |
| Component: | MacRuby | Keywords: | irb |
| Cc: |
Description
$ 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.
Change History
Note: See
TracTickets for help on using
tickets.

