1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
Description: run correctly the built-in command "ulimit"
ulimit is a built-in shell command and cannot be simply called from ruby with
backticks. Passing the command as a string to sh with the -c switch seems to be
the correct way to do this.
Author: Cédric Boutillier <cedric.boutillier@gmail.com>
Last-Update:2011-11-26
--- a/test/tc_parser.rb
+++ b/test/tc_parser.rb
@@ -246,7 +246,7 @@
max_fd = if RUBY_PLATFORM.match(/mswin32|mingw/i)
500
else
- (`ulimit -n`.chomp.to_i) + 1
+ (`sh -c "ulimit -n"`.chomp.to_i) + 1
end
file = File.join(File.dirname(__FILE__), 'model/rubynet.xml')
@@ -353,4 +353,4 @@
assert_instance_of(XML::Document, doc)
assert_instance_of(XML::Parser::Context, parser.context)
end
-end
\ No newline at end of file
+end
|