diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-07 16:15:45 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-07 16:15:45 +0000 |
commit | 60219a0aa3c80ff6843c350ae1078ad54985bab0 (patch) | |
tree | 762eb30a5021bcfeecfd6a51db6a34503281115f /test/ruby/test_m17n_comb.rb | |
parent | 10f263c10e8a22dfad49a573a87810416b53f4fa (diff) | |
download | ruby-60219a0aa3c80ff6843c350ae1078ad54985bab0.tar.gz |
* string.c (tr_trans): should squeeze properly. [ruby-dev:34587]
* string.c (tr_trans): had a bug in treating multi-byte character
replacement.
* string.c (rb_str_delete_bang): need not to do anything for empty
strings.
* test/ruby/test_m17n_comb.rb (TestM17NComb::test_str_delete): add
test for empty receiver.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_m17n_comb.rb')
-rw-r--r-- | test/ruby/test_m17n_comb.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_m17n_comb.rb b/test/ruby/test_m17n_comb.rb index 26efa85ea2..44e7eeff20 100644 --- a/test/ruby/test_m17n_comb.rb +++ b/test/ruby/test_m17n_comb.rb @@ -804,6 +804,10 @@ class TestM17NComb < Test::Unit::TestCase def test_str_delete combination(STRINGS, STRINGS) {|s1, s2| + if s1.empty? + assert_equal(s1, s1.delete(s2)) + next + end if !s1.valid_encoding? || !s2.valid_encoding? assert_raise(ArgumentError) { s1.delete(s2) } next |