[macruby-changes] [3907] MacRuby/trunk/lib/strscan.rb

source_changes at macosforge.org source_changes at macosforge.org
Sun Apr 4 18:00:34 PDT 2010


Revision: 3907
          http://trac.macosforge.org/projects/ruby/changeset/3907
Author:   lsansonetti at apple.com
Date:     2010-04-04 18:00:33 -0700 (Sun, 04 Apr 2010)
Log Message:
-----------
fixed _match method

Modified Paths:
--------------
    MacRuby/trunk/lib/strscan.rb

Modified: MacRuby/trunk/lib/strscan.rb
===================================================================
--- MacRuby/trunk/lib/strscan.rb	2010-04-04 06:07:54 UTC (rev 3906)
+++ MacRuby/trunk/lib/strscan.rb	2010-04-05 01:00:33 UTC (rev 3907)
@@ -623,7 +623,7 @@
     return nil if rest_size < 0
   
     if headonly
-      headonly_pattern = Regexp.new('^' + pattern.to_s)
+      headonly_pattern = Regexp.new('^' + pattern.source, pattern.options)
       @match = headonly_pattern.match rest
     else
       @match = pattern.match rest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100404/1cbc1d8b/attachment.html>


More information about the macruby-changes mailing list