[MacRuby] #1341: StringScanner#scan should not set into Regexp.last_match

MacRuby ruby-noreply at macosforge.org
Mon Jun 27 16:47:00 PDT 2011


#1341: StringScanner#scan should not set into Regexp.last_match
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  minor                 |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------

Comment(by watson1978@…):

 Unfortunately, this issue is different.

 Currently, StringScanner#scan invokes a Regexp#match.
 https://github.com/MacRuby/MacRuby/blob/master/lib/strscan.rb#L639-644
 [[BR]]
 When invoke a Regexp#match, rb_backref_set() in
 rb_reg_matcher_search_find() would change a value of Regexp.last_match

 Maybe, I guess that this issue needs new API which does not invoke a
 rb_backref_set().

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



More information about the macruby-tickets mailing list