Skip to content
Browse files

fixed _match method

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@3907 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent 1e86229 commit dab3af8322c8502c2ec1e481b0c2557afdc6bb69 Laurent Sansonetti committed Apr 5, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/strscan.rb
View
2 lib/strscan.rb
@@ -623,7 +623,7 @@ def _scan(pattern, succptr, getstr, headonly)
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

0 comments on commit dab3af8

Please sign in to comment.
Something went wrong with that request. Please try again.