Revision
3907
Author
lsansonetti@apple.com
Date
2010-04-04 18:00:33 -0700 (Sun, 04 Apr 2010)

Log Message

fixed _match method

Modified Paths

Diff

Modified: MacRuby/trunk/lib/strscan.rb (3906 => 3907)


--- 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