[前][次][番号順一覧][スレッド一覧]

ruby-changes:34173

From: akr <ko1@a...>
Date: Fri, 30 May 2014 21:51:54 +0900 (JST)
Subject: [ruby-changes:34173] akr:r46254 (trunk): test/io/console/test_io_console.rb: Close FDs.

akr	2014-05-30 21:51:49 +0900 (Fri, 30 May 2014)

  New Revision: 46254

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?revision=46254&view=revision

  Log:
    test/io/console/test_io_console.rb: Close FDs.

  Modified files:
    trunk/test/io/console/test_io_console.rb
Index: test/io/console/test_io_console.rb
===================================================================
--- test/io/console/test_io_console.rb	(revision 46253)
+++ test/io/console/test_io_console.rb	(revision 46254)
@@ -222,13 +222,16 @@ class TestIO_Console < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/io/console/test_io_console.rb#L222
     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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]