[MacRuby-devel] [MacRuby] #739: String#match calls block twice

MacRuby ruby-noreply at macosforge.org
Mon Jun 7 11:31:16 PDT 2010


#739: String#match calls block twice
----------------------------+-----------------------------------------------
 Reporter:  jazzbox@…       |       Owner:  lsansonetti@…        
     Type:  defect          |      Status:  new                  
 Priority:  major           |   Milestone:  MacRuby 0.7          
Component:  MacRuby         |    Keywords:                       
----------------------------+-----------------------------------------------
 {{{
 $ macruby -e '"# On branch master".match( /.*On branch (\S*)$/ ) { |m| p
 m[1] }'
 }}}

 gives

 {{{
 "master"
 "a"
 }}}

 ruby1.9 works:

 {{{
 $ ruby1.9 -e '"# On branch master".match( /.*On branch (\S*)$/ ) { |m| p
 m[1] }'
 }}}

 {{{
 "master"
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/739>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list