mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/envutil.rb (invoke_ruby): remove :timeout option before
pass it to Kernel#spawn. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b06e85817d
commit
e9300c4a69
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Dec 18 09:36:51 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
||||
|
||||
* test/ruby/envutil.rb (invoke_ruby): remove :timeout option before
|
||||
pass it to Kernel#spawn.
|
||||
|
||||
Fri Dec 16 17:18:38 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* README, README.ja: 'make check' is preferable to 'make test'.
|
||||
|
|
|
@ -42,6 +42,7 @@ module EnvUtil
|
|||
out_p.set_encoding(enc) if out_p
|
||||
err_p.set_encoding(enc) if err_p
|
||||
end
|
||||
timeout = opt.delete(:timeout) || 10
|
||||
c = "C"
|
||||
child_env = {}
|
||||
LANG_ENVS.each {|lc| child_env[lc] = c}
|
||||
|
@ -60,7 +61,6 @@ module EnvUtil
|
|||
th_stderr = Thread.new { err_p.read } if capture_stderr && capture_stderr != :merge_to_stdout
|
||||
in_p.write stdin_data.to_str
|
||||
in_p.close
|
||||
timeout = opt.fetch(:timeout, 10)
|
||||
if (!th_stdout || th_stdout.join(timeout)) && (!th_stderr || th_stderr.join(timeout))
|
||||
stdout = th_stdout.value if capture_stdout
|
||||
stderr = th_stderr.value if capture_stderr && capture_stderr != :merge_to_stdout
|
||||
|
|
Loading…
Reference in a new issue