ruby-changes:17574
From: nobu <ko1@a...>
Date: Sun, 24 Oct 2010 14:17:03 +0900 (JST)
Subject: [ruby-changes:17574] Ruby:r29579 (trunk): * lib/test/unit.rb (Test::Unit::Mini#run_test_suites): ensure
nobu 2010-10-24 14:13:55 +0900 (Sun, 24 Oct 2010) New Revision: 29579 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29579 Log: * lib/test/unit.rb (Test::Unit::Mini#run_test_suites): ensure output sync mode to be restored. Modified files: trunk/ChangeLog trunk/lib/test/unit.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 29578) +++ ChangeLog (revision 29579) @@ -1,3 +1,8 @@ +Sun Oct 24 14:13:50 2010 Nobuyoshi Nakada <nobu@r...> + + * 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@r...> * vm.c (vm_define_method): defined method is run with the default Index: lib/test/unit.rb =================================================================== --- lib/test/unit.rb (revision 29578) +++ lib/test/unit.rb (revision 29579) @@ -156,11 +156,18 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/