diff --git a/ChangeLog b/ChangeLog index f3e5b9e9fd..ebce687735 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Dec 18 09:36:51 2011 CHIKANAGA Tomoyuki + + * test/ruby/envutil.rb (invoke_ruby): remove :timeout option before + pass it to Kernel#spawn. + Fri Dec 16 17:18:38 2011 Nobuyoshi Nakada * 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