From c9d0a328efed4bd999edb50d9de6171b81252de6 Mon Sep 17 00:00:00 2001
From: naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Sat, 30 Mar 2013 17:07:32 +0000
Subject: [PATCH] Specify external_encoding

http://c5664.rubyci.org/~chkbuild/ruby-trunk/log/20130329T090301Z.diff.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 test/ruby/test_argf.rb | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb
index 1abcd604fd..1d2ded81be 100644
--- a/test/ruby/test_argf.rb
+++ b/test/ruby/test_argf.rb
@@ -44,10 +44,10 @@ class TestArgf < Test::Unit::TestCase
     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
   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
   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