diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-28 23:31:53 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-28 23:31:53 +0000 |
commit | ce79ff70cd94a0223bf407423741ee5546d803ae (patch) | |
tree | f62cdd737eb480ca2f9af270e423a6ed5813c3c6 | |
parent | 6b47d60e1681d643710ef0c1462539cfdcea9877 (diff) |
merges r31016 from trunk into ruby_1_9_2.
--
* test/ruby/test_process.rb (test_execopts_redirect): redirecting fd
>= 3 is not supported on Windows, so should not specify such options
when calling spawn or others.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | test/ruby/test_process.rb | 16 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 17 insertions, 7 deletions
@@ -1,3 +1,9 @@ +Thu Mar 3 21:21:42 2011 NAKAMURA Usaku <usa@ruby-lang.org> + + * test/ruby/test_process.rb (test_execopts_redirect): redirecting fd + >= 3 is not supported on Windows, so should not specify such options + when calling spawn or others. + Sat May 14 12:20:22 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp> * strftime.c (STRFTIME): return 0 and ERANGE when precision is too diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 03cf36e44b..b1f5ead961 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -382,13 +382,17 @@ class TestProcess < Test::Unit::TestCase Process.wait Process.spawn(*ECHO["d"], f=>STDOUT, STDOUT=>f) assert_equal("d", File.read("out").chomp) } - Process.wait Process.spawn(*ECHO["e"], STDOUT=>["out", File::WRONLY|File::CREAT|File::TRUNC, 0644], - 3=>STDOUT, 4=>STDOUT, 5=>STDOUT, 6=>STDOUT, 7=>STDOUT) + opts = {STDOUT=>["out", File::WRONLY|File::CREAT|File::TRUNC, 0644]} + if /mswin|mingw/ !~ RUBY_PLATFORM + opts.merge(3=>STDOUT, 4=>STDOUT, 5=>STDOUT, 6=>STDOUT, 7=>STDOUT) + end + Process.wait Process.spawn(*ECHO["e"], opts) assert_equal("e", File.read("out").chomp) - Process.wait Process.spawn(*ECHO["ee"], STDOUT=>["out", File::WRONLY|File::CREAT|File::TRUNC, 0644], - 3=>0, 4=>:in, 5=>STDIN, - 6=>1, 7=>:out, 8=>STDOUT, - 9=>2, 10=>:err, 11=>STDERR) + opts = {STDOUT=>["out", File::WRONLY|File::CREAT|File::TRUNC, 0644]} + if /mswin|mingw/ !~ RUBY_PLATFORM + opts.merge(3=>0, 4=>:in, 5=>STDIN, 6=>1, 7=>:out, 8=>STDOUT, 9=>2, 10=>:err, 11=>STDERR) + end + Process.wait Process.spawn(*ECHO["ee"], opts) assert_equal("ee", File.read("out").chomp) if /mswin|mingw/ !~ RUBY_PLATFORM # passing non-stdio fds is not supported on Windows @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 209 +#define RUBY_PATCHLEVEL 210 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 |