Closed naitoh closed 9 months ago
I'll look into it.
The problem appears to be in StringScanner#rest. When the effective "rest" length is zero, it always creates a new string with encoding "US-ASCII".
I have a patch in progress that appears to fix the cases provided by @naitoh.
@naitoh Could you create a PR with a few test cases?
@headius
I have a patch in progress that appears to fix the cases provided by @naitoh.
Thank you!
@naitoh Could you create a PR with a few test cases?
I have created #80 which adds a test case.
Fixed by #79. Tests in #80 for @mrkn to decide on.
No Problem case (Ruby 3.3.0) šāāļø
Problem case (JRuby 9.4.5.0 ) š
StringScanner.new("")
can only holdEncoding:US-ASCII
encoding.The above causes the following differences in behavior.
The following appear to be unaffected.