diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_string.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 4e55198a15..a0fb80f46e 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -2181,6 +2181,10 @@ class TestString < Test::Unit::TestCase assert_equal(u("\x81\x82"), "\u3042".byteslice(1..2)) assert_equal(u("\x82")+("\u3042"*9), ("\u3042"*10).byteslice(2, 28)) + + bug7954 = '[ruby-dev:47108]' + assert_equal(false, "\u3042".byteslice(0, 2).valid_encoding?) + assert_equal(false, ("\u3042"*10).byteslice(0, 20).valid_encoding?) end end |