summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-30 17:07:32 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-30 17:07:32 +0000
commitc9d0a328efed4bd999edb50d9de6171b81252de6 (patch)
treefa2d52cd29b0656e1bb3d7b7d6831138ee9975e4 /test
parentca76bb087757848af6e13f59b473037fd8e27a6b (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_argf.rb8
1 files 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