ruby-changes:31428
From: nobu <ko1@a...>
Date: Fri, 1 Nov 2013 22:46:34 +0900 (JST)
Subject: [ruby-changes:31428] nobu:r43507 (trunk): test_m17n.rb: fix encoding
nobu 2013-11-01 22:46:29 +0900 (Fri, 01 Nov 2013) New Revision: 43507 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43507 Log: test_m17n.rb: fix encoding * test/ruby/test_m17n.rb (test_scrub): fix expected encoding, for non-UTF-8 environment. Modified files: trunk/test/ruby/test_m17n.rb Index: test/ruby/test_m17n.rb =================================================================== --- test/ruby/test_m17n.rb (revision 43506) +++ test/ruby/test_m17n.rb (revision 43507) @@ -1524,7 +1524,7 @@ class TestM17N < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_m17n.rb#L1524 assert_raise(ArgumentError){ u("\xE3\x81\x82\xE3\x81\x82\xE3\x81").scrub{u("\x81")} } assert_equal(e("\xA4\xA2\xA2\xAE"), e("\xA4\xA2\xA4").scrub{e("\xA2\xAE")}) - assert_equal("\x81", u("a\x81").scrub {|c| break c}) + assert_equal(u("\x81"), u("a\x81").scrub {|c| break c}) assert_raise(ArgumentError) {u("a\x81").scrub {|c| c}} assert_equal("\uFFFD\u3042".encode("UTF-16BE"), -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/