diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-07 08:39:39 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-07 08:39:39 +0000 |
commit | eb807d42eca121df22f72b95465bba52a4e7fefa (patch) | |
tree | 35b722bc6c94d3b9c5f8f80d41e889c591a80450 /test/ruby/test_process.rb | |
parent | c414d861c109ff546e2bc8c7264859907d6e0f76 (diff) | |
download | ruby-eb807d42eca121df22f72b95465bba52a4e7fefa.tar.gz |
* gc.c (rb_gc_set_params): allow GC parameter configuration by
environment variables. based on a patch from funny-falcon at
https://gist.github.com/856296, but honors safe level.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r-- | test/ruby/test_process.rb | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index f3f3f9eb80..b45bfb9bb0 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -384,20 +384,16 @@ 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"], STDOUT=>f) + Process.wait Process.spawn(*ECHO["d"], f=>STDOUT, STDOUT=>f) assert_equal("d", File.read("out").chomp) } - 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) + 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) assert_equal("e", File.read("out").chomp) - 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) + 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) assert_equal("ee", File.read("out").chomp) if /mswin|mingw/ !~ RUBY_PLATFORM # passing non-stdio fds is not supported on Windows |