ruby-changes:36560
From: usa <ko1@a...>
Date: Sat, 29 Nov 2014 08:52:40 +0900 (JST)
Subject: [ruby-changes:36560] usa:r48641 (trunk): * test/ruby/test_exception.rb (TestException#test_output_string_encoding): need
usa 2014-11-29 08:52:34 +0900 (Sat, 29 Nov 2014) New Revision: 48641 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48641 Log: * test/ruby/test_exception.rb (TestException#test_output_string_encoding): need to specify the encoding of script. Modified files: trunk/test/ruby/test_exception.rb Index: test/ruby/test_exception.rb =================================================================== --- test/ruby/test_exception.rb (revision 48640) +++ test/ruby/test_exception.rb (revision 48641) @@ -677,7 +677,8 @@ end.join https://github.com/ruby/ruby/blob/trunk/test/ruby/test_exception.rb#L677 def test_output_string_encoding # "\x82\xa0" in cp932 is "\u3042" (Japanese hiragana 'a') # change $stderr to force calling rb_io_write() instead of fwrite() - assert_in_out_err(["-Eutf-8:cp932"], '$stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| +assert_in_out_err(["-Eutf-8:cp932"], '# coding: cp932 +$stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| assert_equal 1, outs.size assert_equal 0, errs.size err = outs.first.force_encoding('utf-8') -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/