Created
September 9, 2010 21:48
-
-
Save kronos/572649 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kronos:rubinius kronos$ git diff | |
diff --git a/lib/strscan.rb b/lib/strscan.rb | |
index 1d70184..4e3d9f4 100644 | |
--- a/lib/strscan.rb | |
+++ b/lib/strscan.rb | |
@@ -124,7 +124,7 @@ class StringScanner | |
end | |
def pre_match | |
- string[0...(pos - match.to_s.size)] if matched? | |
+ string[0...(@prev_pos + match.begin(0))] if matched? | |
end | |
def reset_state |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment