From 61bd28b836190bbc8ce110e780da4c4aad9f485b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA 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 --- tool/lib/test/unit/core_assertions.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tool') diff --git a/tool/lib/test/unit/core_assertions.rb b/tool/lib/test/unit/core_assertions.rb index 16d5e14fb1..abd0e45035 100644 --- a/tool/lib/test/unit/core_assertions.rb +++ b/tool/lib/test/unit/core_assertions.rb @@ -264,7 +264,7 @@ module Test 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 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 v1.2.3