* process.c (check_exec_redirect_fd, check_exec_redirect): raise

ArgumentError if fd >= 3 on Windows because the feature is not
  supported.

* test/ruby/test_process.rb (test_execopts_redirect): remove meaningless
  argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2011-03-03 13:13:10 +00:00
parent 0ebf520671
commit 4f8f4a9ee4
3 changed files with 21 additions and 7 deletions

View file

@ -384,7 +384,7 @@ class TestProcess < Test::Unit::TestCase
Process.wait Process.spawn(*ECHO["c"], STDERR=>STDOUT, STDOUT=>["out", File::WRONLY|File::CREAT|File::TRUNC, 0644])
assert_equal("c", File.read("out").chomp)
File.open("out", "w") {|f|
Process.wait Process.spawn(*ECHO["d"], f=>STDOUT, STDOUT=>f)
Process.wait Process.spawn(*ECHO["d"], STDOUT=>f)
assert_equal("d", File.read("out").chomp)
}
opts = {STDOUT=>["out", File::WRONLY|File::CREAT|File::TRUNC, 0644]}