diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-18 04:12:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-18 04:12:06 +0000 |
commit | 9940a8d18180a79c28496214ea8c7f71f8fa7fe1 (patch) | |
tree | b8ad0de7b5e35144cf8959c8024bfbd028858c82 /test | |
parent | 7d24c27d2123c509c546c1563c01c1a01eb34f0f (diff) | |
download | ruby-9940a8d18180a79c28496214ea8c7f71f8fa7fe1.tar.gz |
test/ruby/test_io.rb: test for r61314
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_io.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 009afc3297..00369365d0 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2357,6 +2357,10 @@ End IO.foreach("|" + EnvUtil.rubybin + " -e 'puts :foo; puts :bar; puts :baz'") {|x| a << x } assert_equal(["foo\n", "bar\n", "baz\n"], a) + a = [] + IO.foreach("|" + EnvUtil.rubybin + " -e 'puts :zot'", :open_args => ["r"]) {|x| a << x } + assert_equal(["zot\n"], a) + make_tempfile {|t| a = [] IO.foreach(t.path) {|x| a << x } |