summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-24 18:21:39 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-24 18:21:39 +0000
commitb78b66a97610449c115848c58b9b75b5abc60c8b (patch)
tree558f16fb23cefc683f7b037275330d4aa682c368 /test/ruby/test_io.rb
parenta530172285c817b455adc5ec026bb9f7973c4b1f (diff)
use rlimit_nproc other than Windows
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index a5503cad8f..eac4e59a8f 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1080,7 +1080,9 @@ class TestIO < Test::Unit::TestCase
def ruby(*args)
args = ['-e', '$>.write($<.read)'] if args.empty?
ruby = EnvUtil.rubybin
- f = IO.popen([ruby] + args, 'r+')
+ opts = {}
+ opts[:rlimit_nproc] = 1024 if /mswin|mingw/ =~ RUBY_PLATFORM
+ f = IO.popen([ruby] + args, 'r+', opts)
pid = f.pid
yield(f)
ensure