[前][次][番号順一覧][スレッド一覧]

ruby-changes:18653

From: yugui <ko1@a...>
Date: Thu, 27 Jan 2011 23:24:39 +0900 (JST)
Subject: [ruby-changes:18653] Ruby:r30677 (ruby_1_9_2): merges revision 6057 in MiniTest's repository into ruby_1_9_2.

yugui	2011-01-27 23:24:33 +0900 (Thu, 27 Jan 2011)

  New Revision: 30677

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30677

  Log:
    merges revision 6057 in MiniTest's repository into ruby_1_9_2.
    --
    + Exit autorun via nested at_exit handler, in case other libs call

  Modified files:
    branches/ruby_1_9_2/lib/minitest/unit.rb
    branches/ruby_1_9_2/version.h

Index: ruby_1_9_2/lib/minitest/unit.rb
===================================================================
--- ruby_1_9_2/lib/minitest/unit.rb	(revision 30676)
+++ ruby_1_9_2/lib/minitest/unit.rb	(revision 30677)
@@ -497,8 +497,15 @@
     def self.autorun
       at_exit {
         next if $! # don't run if there was an exception
+
+        # the order here is important. The at_exit handler must be
+        # installed before anyone else gets a chance to install their
+        # own, that way we can be assured that our exit will be last
+        # to run (at_exit stacks).
+        exit_code = nil
+
+        at_exit { exit false if exit_code && exit_code != 0 }
         exit_code = MiniTest::Unit.new.run(ARGV)
-        exit false if exit_code && exit_code != 0
       } unless @@installed_at_exit
       @@installed_at_exit = true
     end
Index: ruby_1_9_2/version.h
===================================================================
--- ruby_1_9_2/version.h	(revision 30676)
+++ ruby_1_9_2/version.h	(revision 30677)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.2"
-#define RUBY_PATCHLEVEL 162
+#define RUBY_PATCHLEVEL 163
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]