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

ruby-changes:67945

From: Hiroshi <ko1@a...>
Date: Sat, 11 Sep 2021 21:05:35 +0900 (JST)
Subject: [ruby-changes:67945] d58e0ffc24 (master): Removed unused alias for run_test

https://git.ruby-lang.org/ruby.git/commit/?id=d58e0ffc24

From d58e0ffc247a18bbd6ec5a7f78c79e171bda4168 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Sat, 11 Sep 2021 20:35:18 +0900
Subject: Removed unused alias for run_test

---
 tool/lib/test/unit/testcase.rb | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/tool/lib/test/unit/testcase.rb b/tool/lib/test/unit/testcase.rb
index a526c17..565a69a 100644
--- a/tool/lib/test/unit/testcase.rb
+++ b/tool/lib/test/unit/testcase.rb
@@ -195,7 +195,14 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/testcase.rb#L195
         result
       end
 
-      alias :run_test :__send__
+      RUN_TEST_TRACE = "#{__FILE__}:#{__LINE__+3}:in `run_test'".freeze
+      def run_test(name)
+        progname, $0 = $0, "#{$0}: #{self.class}##{name}"
+        self.__send__(name)
+      ensure
+        $@.delete(RUN_TEST_TRACE) if $@
+        $0 = progname
+      end
 
       def initialize name # :nodoc:
         @__name__ = name
@@ -338,15 +345,6 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/testcase.rb#L345
         defined?(@test_order) ? @test_order : superclass.test_order
       end
       self.test_order = test_order
-      undef run_test
-      RUN_TEST_TRACE = "#{__FILE__}:#{__LINE__+3}:in `run_test'".freeze
-      def run_test(name)
-        progname, $0 = $0, "#{$0}: #{self.class}##{name}"
-        self.__send__(name)
-      ensure
-        $@.delete(RUN_TEST_TRACE) if $@
-        $0 = progname
-      end
 
     end
   end
-- 
cgit v1.1


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

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