diff --git a/test/rake/support/ruby_runner.rb b/test/rake/support/ruby_runner.rb index 404e61a668..d51dd24b89 100644 --- a/test/rake/support/ruby_runner.rb +++ b/test/rake/support/ruby_runner.rb @@ -18,12 +18,13 @@ module RubyRunner def run_ruby(option_list) puts "COMMAND: [#{RUBY} #{option_list.join ' '}]" if @verbose - inn, out, err, wait = Open3.popen3(RUBY, *option_list) - inn.close + Open3.popen3(RUBY, *option_list) {|inn, out, err, wait| + inn.close - @exit = wait ? wait.value : $? - @out = out.read - @err = err.read + @exit = wait ? wait.value : $? + @out = out.read + @err = err.read + } puts "OUTPUT: [#{@out}]" if @verbose puts "ERROR: [#{@err}]" if @verbose