1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/date] Workaround for non-ruby repository like ruby/date, flori/json

https://github.com/ruby/date/commit/1ff7fa2d80
This commit is contained in:
Hiroshi SHIBATA 2020-12-23 13:15:49 +09:00
parent 8a1e12499b
commit 61bd28b836
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -264,7 +264,7 @@ module Test
at_exit { at_exit {
out.puts [Marshal.dump($!)].pack('m'), "assertions=\#{self._assertions}" 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 end
def assert_separately(args, file = nil, line = nil, src, ignore_stderr: nil, **opt) def assert_separately(args, file = nil, line = nil, src, ignore_stderr: nil, **opt)
@ -276,7 +276,7 @@ module Test
capture_stdout = true capture_stdout = true
unless /mswin|mingw/ =~ RUBY_PLATFORM unless /mswin|mingw/ =~ RUBY_PLATFORM
capture_stdout = false capture_stdout = false
opt[:out] = MiniTest::Unit.output opt[:out] = MiniTest::Unit.output if defined?(MiniTest::Unit)
res_p, res_c = IO.pipe res_p, res_c = IO.pipe
opt[res_c.fileno] = res_c.fileno opt[res_c.fileno] = res_c.fileno
end end