ruby-changes:27955
From: naruse <ko1@a...>
Date: Sun, 31 Mar 2013 02:10:21 +0900 (JST)
Subject: [ruby-changes:27955] naruse:r40007 (trunk): Specify external_encoding
naruse 2013-03-31 02:07:32 +0900 (Sun, 31 Mar 2013) New Revision: 40007 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40007 Log: Specify external_encoding http://c5664.rubyci.org/~chkbuild/ruby-trunk/log/20130329T090301Z.diff.html.gz Modified files: trunk/test/ruby/test_argf.rb Index: test/ruby/test_argf.rb =================================================================== --- test/ruby/test_argf.rb (revision 40006) +++ test/ruby/test_argf.rb (revision 40007) @@ -44,10 +44,10 @@ class TestArgf < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_argf.rb#L44 t end - def ruby(*args) + def ruby(*args, external_encoding: Encoding::UTF_8) args = ['-e', '$>.write($<.read)'] if args.empty? ruby = EnvUtil.rubybin - f = IO.popen([ruby] + args, 'r+') + f = IO.popen([ruby] + args, 'r+', external_encoding: external_encoding) yield(f) ensure f.close unless !f || f.closed? @@ -247,8 +247,6 @@ class TestArgf < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_argf.rb#L247 end def test_inplace_stdin - t = make_tempfile - assert_in_out_err(["-", "-"], <<-INPUT, [], /Can't do inplace edit for stdio; skipping/) ARGF.inplace_mode = '.bak' f = ARGF.dup @@ -259,8 +257,6 @@ class TestArgf < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_argf.rb#L257 end def test_inplace_stdin2 - t = make_tempfile - assert_in_out_err(["-"], <<-INPUT, [], /Can't do inplace edit for stdio/) ARGF.inplace_mode = '.bak' while line = ARGF.gets -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/