summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-16 00:47:20 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-16 00:47:20 +0000
commit0d5f3a6f95cda645681bc3560781d575e0100ed9 (patch)
tree455a6cf705e6b3eb6a1afcd73936cb7ba1cfaccb /test/ruby
parent85c1f452e4575b806a58af2b7b2f858f56ad99b4 (diff)
downloadruby-0d5f3a6f95cda645681bc3560781d575e0100ed9.tar.gz
ruby-0d5f3a6f95cda645681bc3560781d575e0100ed9.tar.xz
ruby-0d5f3a6f95cda645681bc3560781d575e0100ed9.zip
* string.c ():
* string.c (): * string.c (single_byte_optimizable): make function inline. based on a patch from Michael Selig <michael.selig at fs.com.au> in [ruby-core:18532]. * string.c (str_modify_keep_cr): new function act as rb_str_modify(), but don't clear coderange * string.c (rb_str_casecmp): specialized for single byte strings. * string.c (rb_str_splice): preserve coderange. * string.c (rb_str_slice_bang, rb_str_reverse_bang, rb_str_upcase_bang, rb_str_downcase_bang, tr_trans, rb_str_capitalize_bang, rb_str_swapcase_bang, rb_str_delete_bang, rb_str_chop_bang, rb_str_chomp_bang, rb_str_lstrip_bang, rb_str_rstrip_bang): ditto. * string.c (rb_str_clear): preset coderange. * string.c (rb_str_split_m): specialized for splitting with a string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_m17n_comb.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_m17n_comb.rb b/test/ruby/test_m17n_comb.rb
index 37b1a687a..d1a5d0649 100644
--- a/test/ruby/test_m17n_comb.rb
+++ b/test/ruby/test_m17n_comb.rb
@@ -1158,11 +1158,11 @@ class TestM17NComb < Test::Unit::TestCase
def test_str_split
combination(STRINGS, STRINGS) {|s1, s2|
if !s2.valid_encoding?
- assert_raise(RegexpError) { s1.split(s2) }
+ assert_raise(ArgumentError, RegexpError) { s1.split(s2) }
next
end
if !s1.ascii_only? && !s2.ascii_only? && s1.encoding != s2.encoding
- assert_raise(ArgumentError) { s1.split(s2) }
+ assert_raise(ArgumentError, EncodingCompatibilityError) { s1.split(s2) }
next
end
if !s1.valid_encoding?