[MacRuby] #984: strange scoping error in macirb
MacRuby
ruby-noreply at macosforge.org
Fri Oct 29 00:47:10 PDT 2010
#984: strange scoping error in macirb
-------------------------------------+--------------------------------------
Reporter: mcowan@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords: eval for-loop
-------------------------------------+--------------------------------------
Comment(by eloy.de.enige@…):
The assertion problem also happens with #each:
{{{
$ macruby -e "eval('i = 0; (1..2).each do |i|; puts i; end')"
Assertion failed: (current_block), function compile_lvar_slot, file
compiler.cpp, line 6177.
}}}
But not if the outer i lvar that is being shadowed is removed:
{{{
$ macruby -e "eval('(1..2).each do |i|; puts i; end')"
1
2
}}}
However, the for-loop still bails without the shadowing, although at a
different assertion:
{{{
$ macruby -e "eval('for i in 1..2 do; puts i; end')"
Assertion failed: (slot != NULL), function compile_lvar_slot, file
compiler.cpp, line 6179.
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/984#comment:5>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list