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

ruby-changes:29396

From: nobu <ko1@a...>
Date: Thu, 20 Jun 2013 02:46:48 +0900 (JST)
Subject: [ruby-changes:29396] nobu:r41448 (trunk): test_process.rb: redirect to null

nobu	2013-06-20 02:46:39 +0900 (Thu, 20 Jun 2013)

  New Revision: 41448

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

  Log:
    test_process.rb: redirect to null
    
    * test/ruby/test_process.rb (test_no_curdir): since standard handles
      cannot close on Windows, redirect to null device.
    
    * test/ruby/test_process.rb (assert_fail_too_long_path): ditto.

  Modified files:
    trunk/test/ruby/test_process.rb

Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb	(revision 41447)
+++ test/ruby/test_process.rb	(revision 41448)
@@ -1350,7 +1350,7 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L1350
       Dir.chdir("vd") {
         dir = "#{d}/vd"
         # OpenSolaris cannot remove the current directory.
-        system(RUBY, "--disable-gems", "-e", "Dir.chdir '..'; Dir.rmdir #{dir.dump}")
+        system(RUBY, "--disable-gems", "-e", "Dir.chdir '..'; Dir.rmdir #{dir.dump}", err: File::NULL)
         system({"RUBYLIB"=>nil}, RUBY, "--disable-gems", "-e", "exit true")
         status = $?
       }
@@ -1397,7 +1397,7 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L1397
       assert_raise(*exs, mesg) do
         begin
           loop do
-            Process.spawn(cmds.join(sep), [STDOUT, STDERR]=>:close)
+            Process.spawn(cmds.join(sep), [STDOUT, STDERR]=>File::NULL)
             min = [cmds.size, min].max
             cmds *= 100
           end

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

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