summaryrefslogtreecommitdiff
path: root/test/io
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-30 12:51:49 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-30 12:51:49 +0000
commite6da7c5ca9084a26bc1ce1828efe17f9eba4264d (patch)
tree3be3c95d671ae7702a8fa62998260671cfcf88c9 /test/io
parent6f226d9d42676860cdabc1e1c85cb9e9202e8ddd (diff)
test/io/console/test_io_console.rb: Close FDs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/io')
-rw-r--r--test/io/console/test_io_console.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb
index 150d7572db..3637546eb5 100644
--- a/test/io/console/test_io_console.rb
+++ b/test/io/console/test_io_console.rb
@@ -222,13 +222,16 @@ class TestIO_Console < Test::Unit::TestCase
end
else
def test_sync
- r, _, pid = PTY.spawn(EnvUtil.rubybin, "-rio/console", "-e", "p IO.console.class")
+ r, w, pid = PTY.spawn(EnvUtil.rubybin, "-rio/console", "-e", "p IO.console.class")
rescue RuntimeError
skip $!
else
con = r.gets.chomp
Process.wait(pid)
assert_match("File", con)
+ ensure
+ r.close if r
+ w.close if w
end
end