#643: Yield fails when captured in a block that gets called
-------------------------------+--------------------------------------------
Reporter: tpit...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: minor | Milestone:
Component: MacRuby | Keywords: block, yield, call
-------------------------------+--------------------------------------------
Comment(by lsansone...@…):
Indeed:
{{{
$ ./miniruby -e "def foo(&b); b.call; end; def bar; foo { yield }; end;
bar { p 42 }"
/Users/lrz/src/macruby-trunk/-e:1:in `<main>': no block given
(LocalJumpError)
}}}
Note that the bug does not seem to happen when the block is passed inline
(so this can be used as a temporary workaround):
{{{
$ ./miniruby -e "def foo; yield; end; def bar; foo { yield }; end; bar { p
42 }"
42
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/643#comment:1>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel