diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-30 19:45:30 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-30 19:45:30 +0000 |
commit | d074ef4d60e389348d10dd1d81e76634c17acb2d (patch) | |
tree | f11e712b6564846cfda612cba73797920a59e224 /test/ruby/test_string.rb | |
parent | 16ceba03968244e64e015965c2f3ec6a8f1836fb (diff) | |
download | ruby-d074ef4d60e389348d10dd1d81e76634c17acb2d.tar.gz |
* string.c (tr_setup_table): fix bug in r29146.
Initialize table even if cflag is 0; tr_find see whether
del is empty or not.
* string.c (tr_find): nodel can't be NULL; if NULL, it means
it is not specified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r-- | test/ruby/test_string.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index f28c1c84e7..ce90c1e8d7 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -502,6 +502,7 @@ class TestString < Test::Unit::TestCase assert_equal(false, "a\u3041\u3042".tr("\u3041", "a").ascii_only?) assert_equal("a", "abc\u{3042 3044 3046}".delete("^a")) + assert_equal("bc\u{3042 3044 3046}", "abc\u{3042 3044 3046}".delete("a")) assert_equal("\u3042", "abc\u{3042 3044 3046}".delete("^\u3042")) end |