summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-27 14:24:33 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-27 14:24:33 +0000
commitb4eba9bba0976a1fabba7472cee69d320018250a (patch)
tree4a7b32cf6eb6ba5a46af6186dca6e5ef4e2e6b8c
parent2de2b2ab2fef313a21826c514bb05d908d00b9b1 (diff)
merges revision 6057 in MiniTest's repository into ruby_1_9_2.
-- + Exit autorun via nested at_exit handler, in case other libs call git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/minitest/unit.rb9
-rw-r--r--version.h2
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/minitest/unit.rb b/lib/minitest/unit.rb
index 5a69064578..0a45932079 100644
--- a/lib/minitest/unit.rb
+++ b/lib/minitest/unit.rb
@@ -497,8 +497,15 @@ module MiniTest
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
diff --git a/version.h b/version.h
index d10c55824e..a1d312db19 100644
--- a/version.h
+++ b/version.h
@@ -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