diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/ruby/envutil.rb | 2 |
2 files changed, 6 insertions, 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'. 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 |