[前][次][番号順一覧][スレッド一覧]

ruby-changes:31422

From: nobu <ko1@a...>
Date: Fri, 1 Nov 2013 17:00:46 +0900 (JST)
Subject: [ruby-changes:31422] nobu:r43501 (trunk): test_m17n.rb: nil replacement

nobu	2013-11-01 17:00:43 +0900 (Fri, 01 Nov 2013)

  New Revision: 43501

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43501

  Log:
    test_m17n.rb: nil replacement
    
    * test/ruby/test_m17n.rb (test_scrub, test_scrub_bang): now explicit
      nil is allowed as replacement.

  Modified files:
    trunk/test/ruby/test_m17n.rb
Index: test/ruby/test_m17n.rb
===================================================================
--- test/ruby/test_m17n.rb	(revision 43500)
+++ test/ruby/test_m17n.rb	(revision 43501)
@@ -1497,6 +1497,7 @@ class TestM17N < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_m17n.rb#L1497
     assert_not_same(str, str.scrub)
     str.force_encoding(Encoding::ISO_2022_JP) # dummy encoding
     assert_not_same(str, str.scrub)
+    assert_nothing_raised(ArgumentError) {str.scrub(nil)}
 
     assert_equal("\uFFFD\uFFFD\uFFFD", u("\x80\x80\x80").scrub)
     assert_equal("\uFFFDA", u("\xF4\x80\x80A").scrub)
@@ -1542,6 +1543,7 @@ class TestM17N < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_m17n.rb#L1543
     assert_same(str, str.scrub!)
     str.force_encoding(Encoding::ISO_2022_JP) # dummy encoding
     assert_same(str, str.scrub!)
+    assert_nothing_raised(ArgumentError) {str.scrub!(nil)}
 
     str = u("\x80\x80\x80")
     str.scrub!

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]