summaryrefslogtreecommitdiff
path: root/tool/lib/test/unit.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-09-08 19:33:34 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-09-11 08:48:03 +0900
commit8ee38bdd7d44dd8e6b7d073349c1b7abbf1346a8 (patch)
tree939abf6a09f2a90ee4533ddb3ecb13962f56f272 /tool/lib/test/unit.rb
parent62db6e47b6c0fbba337649bfa468ec221d5d1001 (diff)
Removed duplicated autorun method
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4813
Diffstat (limited to 'tool/lib/test/unit.rb')
-rw-r--r--tool/lib/test/unit.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb
index ce470a7c13..44f3e11ba2 100644
--- a/tool/lib/test/unit.rb
+++ b/tool/lib/test/unit.rb
@@ -1207,30 +1207,6 @@ module Test
end
##
- # Registers Test::Unit::Runner to run tests at process exit
-
- def self.autorun
- at_exit {
- # don't run if there was a non-exit exception
- next if $! and not $!.kind_of? SystemExit
-
- # 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 {
- @@after_tests.reverse_each(&:call)
- exit false if exit_code && exit_code != 0
- }
-
- exit_code = Test::Unit::Runner.new.run ARGV
- } unless @@installed_at_exit
- @@installed_at_exit = true
- end
-
- ##
# Returns the stream to use for output.
def self.output
@@ -1493,8 +1469,6 @@ module Test
raise
end
- class << self; undef autorun; end
-
@@stop_auto_run = false
def self.autorun
at_exit {