summaryrefslogtreecommitdiff
path: root/test/ruby/test_m17n.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-28 07:46:49 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-28 07:46:49 +0000
commit4960e66ab64350c6a6cc89b3b40fcd842dfa65d9 (patch)
treed656abf4ffd0da64f0ac0082603224e1ac24ec62 /test/ruby/test_m17n.rb
parent3fec2bee37ebbb54f5e7fc2fee3ba832a2994882 (diff)
* string.c (tr_trans): when the hash for multibyte repl is empty,
tr is inverse mode, and a character doesn't much the table, the character should be replaced by last replacement. Bug #4449 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r--test/ruby/test_m17n.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index a29d509fc4..c4bc9e6637 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -962,6 +962,7 @@ class TestM17N < Test::Unit::TestCase
assert_equal("X\u3042\u3044X", "A\u3042\u3044\u3046".tr("^\u3042\u3044", "X"))
assert_equal("\u3042\u3046" * 100, ("\u3042\u3044" * 100).tr("\u3044", "\u3046"))
+ assert_equal("Y", "\u3042".tr("^X", "Y"))
end
def test_tr_s