diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_string.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index b0c6e447eb..dd3a0349b5 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -3087,6 +3087,12 @@ CODE assert_equal("\u3042", "\u3042\u3043".chr) assert_equal('', ''.chr) end + + def test_substr_code_range + data = "\xff" + "a"*200 + assert_not_predicate(data, :valid_encoding?) + assert_predicate(data[100..-1], :valid_encoding?) + end end class TestString2 < TestString |
