diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-22 13:42:22 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-22 13:42:22 +0000 |
commit | 94fd9db802721da2d906518c964dcfff044aac52 (patch) | |
tree | 8f78626556c9b38f407dbcdb899ae5a19c652264 /test | |
parent | c1833d14d1e801e1a2f4b293b90d65f6b6c5a415 (diff) | |
download | ruby-94fd9db802721da2d906518c964dcfff044aac52.tar.gz ruby-94fd9db802721da2d906518c964dcfff044aac52.tar.xz ruby-94fd9db802721da2d906518c964dcfff044aac52.zip |
* string.c (tr_trans): should recalculate coderange.
[ruby-core:22326] (reopened at [ruby-core:22328])
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_string.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index c5375c735..d4b6ff208 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1432,6 +1432,8 @@ class TestString < Test::Unit::TestCase def test_tr_s assert_equal(S("hypo"), S("hello").tr_s(S("el"), S("yp"))) assert_equal(S("h*o"), S("hello").tr_s(S("el"), S("*"))) + assert_equal("a".hash, "\u0101\u0101".tr_s("\u0101", "a").hash) + assert_equal(true, "\u3041\u3041".tr("\u3041", "a").ascii_only?) end def test_tr_s! |