diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-28 09:13:48 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-28 09:13:48 +0000 |
commit | d8bb5917bf772243d091a1bbc6d6aeb37ec717bf (patch) | |
tree | f092f611539e2f574e9da0c7c6e96aeb18b4c46c /test/ruby | |
parent | bccd52dd9d777a0ea87242c6e2faa7d73f783fad (diff) |
merge revision(s) 39495: [Backport #7954]
* string.c (str_byte_substr): don't set coderange if it's not known.
[Bug #7954] [ruby-dev:47108]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@39978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-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 4d9d172ccf..6185e23c90 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1995,5 +1995,9 @@ 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 |