From 071e1ba1f86211d742e43a67bc5e106b5a69cddf Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 24 Oct 2010 05:13:55 +0000 Subject: * lib/test/unit.rb (Test::Unit::Mini#run_test_suites): ensure output sync mode to be restored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/test/unit.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib/test') diff --git a/lib/test/unit.rb b/lib/test/unit.rb index f722205fa4..b5b9f719b1 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -156,11 +156,18 @@ module Test def self.autorun at_exit { Test::Unit::RunCount.run_once { - exit(Test::Unit::Mini.new.run(ARGV) || true) - } + exit(Test::Unit::Mini.new.run(ARGV) || true) + } } unless @@installed_at_exit @@installed_at_exit = true end + + def run_test_suites(*args) + old_sync = @@out.sync if @@out.respond_to?(:sync=) + super + ensure + @@out.sync = old_sync if @@out.respond_to?(:sync=) + end end end end -- cgit v1.2.3