diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_string.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 215fccfb64..06df67de38 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -3397,6 +3397,9 @@ CODE assert_byteindex(6, S("にんにちは"), S("に"), 6) assert_byteindex(6, S("にんにちは"), /に./, 6) assert_raise(IndexError) { S("にんにちは").byteindex(?に, 7) } + + s = S("foobarbarbaz") + assert !1000.times.any? {s.byteindex("", 100_000_000)} end def test_byterindex |
