[MacRuby-devel] [MacRuby] #643: Yield fails when captured in a block that gets called
MacRuby
ruby-noreply at macosforge.org
Thu Apr 1 18:12:17 PDT 2010
#643: Yield fails when captured in a block that gets called
-------------------------------+--------------------------------------------
Reporter: tpitale@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: minor | Milestone:
Component: MacRuby | Keywords: block, yield, call
-------------------------------+--------------------------------------------
Comment(by lsansonetti@…):
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/>
More information about the MacRuby-devel
mailing list