diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/test/unit.rb | 11 |
2 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Sun Oct 24 14:13:50 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/test/unit.rb (Test::Unit::Mini#run_test_suites): ensure + output sync mode to be restored. + Sun Oct 24 14:11:16 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> * vm.c (vm_define_method): defined method is run with the default 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 |