[MacRuby] #1304: Block Fails to Return Value Upon Break

MacRuby ruby-noreply at macosforge.org
Wed May 25 16:55:10 PDT 2011


#1304: Block Fails to Return Value Upon Break
----------------------------+-----------------------------------------------
 Reporter:  techzen@…       |       Owner:  lsansonetti@…        
     Type:  defect          |      Status:  new                  
 Priority:  blocker         |   Milestone:                       
Component:  MacRuby         |    Keywords:                       
----------------------------+-----------------------------------------------

Comment(by lsansonetti@…):

 Here is a reduction:

 {{{
 $ ./miniruby -e "def foo; yield; end; def bar; x=true; while x; x=false;
 foo { yield }; end; end; p bar { break 42 }"
 nil
 $ ruby -e "def foo; yield; end; def bar; x=true; while x; x=false; foo {
 yield }; end; end; p bar { break 42 }"
 42
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1304#comment:1>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list