forked from jruby/jruby
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes jruby#7649. Infinite loop in StringScanner regex
Crux of problem was strscan#concat was calling JRuby String append function in Java and that was a pre-m17n version of append which was not encoding aware OR coderange aware. As a result, the string thought it was 7bit ASCII (narrator: it was not) and this made joni go off the rails. The fix I used was to move append19 impl into append and deprecate append19. This version does all the right things. In looking at callers of append there were not many consumers. ARGF#read was also broken in the same way since we would be appending what- ever file in its encoding onto the existing string.
- Loading branch information
Showing
2 changed files
with
13 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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