diff options
Diffstat (limited to 'test/ruby/envutil.rb')
-rw-r--r-- | test/ruby/envutil.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index 4a8451a9de..45f9c7658f 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -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 |