diff options
| author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-10 16:05:14 +0000 |
|---|---|---|
| committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-10 16:05:14 +0000 |
| commit | d2b2159fbd9169b3370123a13bbb4e7721bceb7c (patch) | |
| tree | 8a1e5ba731b1ac1288deea762f9b5496681f405e /test/ruby | |
| parent | 300b401c60387e72e11163d13ee649f9f60ded02 (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_2_0_0@39706 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 7b4dc2951d..43be67893c 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -2180,6 +2180,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 |
