ruby/test/strscan
Charles Oliver Nutter 8685a81e6a
[ruby/strscan] jruby: Check if len++ walked off the end
(https://github.com/ruby/strscan/pull/153)

Fix https://github.com/ruby/strscan/pull/152

CRuby can walk off the end because there's always a null byte. In JRuby,
the byte array is often (usually?) the exact size of the string. So we
need to check if len++ walked off the end.

This code was ported from a version by @byroot in
https://github.com/ruby/strscan/pull/127 but I missed adding this check
due to a lack of tests. A test is included for both "-" and "+" parsing.

1abe4ca556
2025-05-08 18:03:04 +09:00
..
test_ractor.rb [ruby/strscan] test: don't omit "(...)" for method calls that have at least one argument 2024-12-02 10:50:34 +09:00
test_stringscanner.rb [ruby/strscan] jruby: Check if len++ walked off the end 2025-05-08 18:03:04 +09:00