From d074ef4d60e389348d10dd1d81e76634c17acb2d Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 30 Aug 2010 19:45:30 +0000 Subject: * 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 --- test/ruby/test_string.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test') 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 -- cgit v1.2.3