You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
#scan_until behaves differently with Regexp and String patterns #131
When pattern is String then #pre_match and #matched work differently - #matched returns a substring from the current position to the end of a found substring and #pre_match returns "".
Activity
eregon commentedon Feb 11, 2025
This is a clear inconsistency so it seems a bug, I think the Regexp behavior is the correct one (and exists since longer).
Discovered by writing more StringScanner specs while implementing new StringScanner methods on TruffleRuby.
kou commentedon Feb 11, 2025
I agree that the String pattern case has a bug. It should be same as the Regexp pattern.
@naitoh Could you take a look at this? #106 may be related.
naitoh commentedon Feb 12, 2025
Oh, sorry.
I will check this issue.
fix a bug that scan_until behaves differently with Regexp and String …
fix a bug that scan_until behaves differently with Regexp and String …
Fix a bug that scan_until behaves differently with Regexp and String …
[ruby/strscan] Fix a bug that scan_until behaves differently with
[ruby/strscan] Fix a bug that scan_until behaves differently with