ruby-changes:9181
From: yugui <ko1@a...>
Date: Sat, 13 Dec 2008 13:46:18 +0900 (JST)
Subject: [ruby-changes:9181] Ruby:r20718 (ruby_1_9_1, trunk): * test/ruby/test_m17n_comb.rb: feature changed in r20626.
yugui 2008-12-13 13:45:56 +0900 (Sat, 13 Dec 2008) New Revision: 20718 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20718 Log: * test/ruby/test_m17n_comb.rb: feature changed in r20626. follows it. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/test/ruby/test_m17n_comb.rb trunk/ChangeLog trunk/test/ruby/test_m17n_comb.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 20717) +++ ChangeLog (revision 20718) @@ -1,3 +1,8 @@ +Sat Dec 13 13:41:44 2008 Yuki Sonoda (Yugui) <yugui@y...> + + * test/ruby/test_m17n_comb.rb: feature changed in r20626. + follows it. + Sat Dec 13 13:03:20 2008 Tadayoshi Funaba <tadf@d...> * complex.c: use rb_usascii_str_new2 instead of rb_str_new2. Index: test/ruby/test_m17n_comb.rb =================================================================== --- test/ruby/test_m17n_comb.rb (revision 20717) +++ test/ruby/test_m17n_comb.rb (revision 20718) @@ -1099,7 +1099,11 @@ next end if !s1.ascii_only? && !s2.ascii_only? && s1.encoding != s2.encoding - assert_raise(ArgumentError) { s1.scan(s2) } + if s1.valid_encoding? + assert_raise(Encoding::CompatibilityError) { s1.scan(s2) } + else + assert_raise(ArgumentError, /invalid byte sequence/) { s1.scan(s2) } + end next end if !s1.valid_encoding? @@ -1418,7 +1422,7 @@ next end if !str_enc_compatible?(s1, s2) - assert_raise(ArgumentError, desc) { doit.call } + assert_raise(Encoding::CompatibilityError, desc) { doit.call } next end if !enccall(s1, :include?, s2) @@ -1476,7 +1480,7 @@ next end if !str_enc_compatible?(s1, s2) - assert_raise(ArgumentError, desc) { doit.call } + assert_raise(Encoding::CompatibilityError, desc) { doit.call } next end if !enccall(s1, :include?, s2) Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 20717) +++ ruby_1_9_1/ChangeLog (revision 20718) @@ -1,3 +1,8 @@ +Sat Dec 13 13:41:44 2008 Yuki Sonoda (Yugui) <yugui@y...> + + * test/ruby/test_m17n_comb.rb: feature changed in r20626. + follows it. + Sat Dec 13 12:48:57 2008 Yuki Sonoda (Yugui) <yugui@y...> * test/ruby/test_m17n.rb: feature changed in r20626. Index: ruby_1_9_1/test/ruby/test_m17n_comb.rb =================================================================== --- ruby_1_9_1/test/ruby/test_m17n_comb.rb (revision 20717) +++ ruby_1_9_1/test/ruby/test_m17n_comb.rb (revision 20718) @@ -1099,7 +1099,11 @@ next end if !s1.ascii_only? && !s2.ascii_only? && s1.encoding != s2.encoding - assert_raise(ArgumentError) { s1.scan(s2) } + if s1.valid_encoding? + assert_raise(Encoding::CompatibilityError) { s1.scan(s2) } + else + assert_raise(ArgumentError, /invalid byte sequence/) { s1.scan(s2) } + end next end if !s1.valid_encoding? @@ -1418,7 +1422,7 @@ next end if !str_enc_compatible?(s1, s2) - assert_raise(ArgumentError, desc) { doit.call } + assert_raise(Encoding::CompatibilityError, desc) { doit.call } next end if !enccall(s1, :include?, s2) @@ -1476,7 +1480,7 @@ next end if !str_enc_compatible?(s1, s2) - assert_raise(ArgumentError, desc) { doit.call } + assert_raise(Encoding::CompatibilityError, desc) { doit.call } next end if !enccall(s1, :include?, s2) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/