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

ruby-changes:64505

From: Hiroshi <ko1@a...>
Date: Wed, 23 Dec 2020 13:53:56 +0900 (JST)
Subject: [ruby-changes:64505] 61bd28b836 (master): [ruby/date] Workaround for non-ruby repository like ruby/date, flori/json

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

From 61bd28b836190bbc8ce110e780da4c4aad9f485b Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Wed, 23 Dec 2020 13:15:49 +0900
Subject: [ruby/date] Workaround for non-ruby repository like ruby/date,
 flori/json

https://github.com/ruby/date/commit/1ff7fa2d80

diff --git a/tool/lib/test/unit/core_assertions.rb b/tool/lib/test/unit/core_assertions.rb
index 16d5e14..abd0e45 100644
--- a/tool/lib/test/unit/core_assertions.rb
+++ b/tool/lib/test/unit/core_assertions.rb
@@ -264,7 +264,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/core_assertions.rb#L264
         at_exit {
           out.puts [Marshal.dump($!)].pack('m'), "assertions=\#{self._assertions}"
         }
-        Test::Unit::Runner.class_variable_set(:@@stop_auto_run, true)
+        Test::Unit::Runner.class_variable_set(:@@stop_auto_run, true) if defined?(Test::Unit::Runner)
       end
 
       def assert_separately(args, file = nil, line = nil, src, ignore_stderr: nil, **opt)
@@ -276,7 +276,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/core_assertions.rb#L276
         capture_stdout = true
         unless /mswin|mingw/ =~ RUBY_PLATFORM
           capture_stdout = false
-          opt[:out] = MiniTest::Unit.output
+          opt[:out] = MiniTest::Unit.output if defined?(MiniTest::Unit)
           res_p, res_c = IO.pipe
           opt[res_c.fileno] = res_c.fileno
         end
-- 
cgit v0.10.2


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

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