[MacRuby] #643: Yield fails when captured in a block that gets called
#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 -------------------------------+-------------------------------------------- Works in 1.9.1 and 1.9.2, fails with "LocalJumpError; no block given" in MacRuby nightly from 3/30/2010. http://gist.github.com/350892 -- Ticket URL: <http://www.macruby.org/trac/ticket/643> MacRuby <http://macruby.org/>
#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/>
participants (1)
-
MacRuby