diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-16 11:06:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-16 11:06:27 +0000 |
commit | ba20fe6289984abf051f86e4dae254dcb071c86e (patch) | |
tree | 8c42bd7e65369ec697a355fe0c52d9ea07f71d70 /test/ruby/test_string.rb | |
parent | 7af3e9f08b6f277b7f96d7ed2a0115d1452d98cc (diff) | |
download | ruby-ba20fe6289984abf051f86e4dae254dcb071c86e.tar.gz |
* string.c (trnext): should advance char-wise.
[ruby-core:43335][Bug #6156]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_string.rb')
-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 3b1029ecdd..17de2ece2d 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1500,6 +1500,10 @@ class TestString < Test::Unit::TestCase assert_equal(true, "\u0101".tr("\u0101", "a").ascii_only?) assert_equal(true, "\u3041".tr("\u3041", "a").ascii_only?) assert_equal(false, "\u3041\u3042".tr("\u3041", "a").ascii_only?) + + bug6156 = '[ruby-core:43335]' + str, range, star = %w[b a-z *].map{|s|s.encode("utf-16le")} + assert_equal(star, str.tr(range, star), bug6156) end def test_tr! |