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