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

ruby-changes:63889

From: Takashi <ko1@a...>
Date: Fri, 4 Dec 2020 14:25:31 +0900 (JST)
Subject: [ruby-changes:63889] 30fba5f37d (master): Do not require time and fileutils by default

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

From 30fba5f37d9058cc7e4d852ff211313f13ded3a1 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Thu, 3 Dec 2020 21:24:35 -0800
Subject: Do not require time and fileutils by default

I have no idea what I'm doing, but the previous commit caused lots of CI
failures like https://github.com/ruby/ruby/runs/1496949568 and this
place is the most suspicious.

diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb
index 8b29219..33466bd 100644
--- a/tool/lib/test/unit.rb
+++ b/tool/lib/test/unit.rb
@@ -8,9 +8,7 @@ require 'test/unit/assertions' https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit.rb#L8
 require_relative '../envutil'
 require_relative '../colorize'
 require 'test/unit/testcase'
-require 'fileutils'
 require 'optparse'
-require 'time'
 
 # See Test::Unit
 module Test
@@ -348,6 +346,8 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit.rb#L346
         warn "option."
         warn ""
         if File.exist?('core')
+          require 'fileutils'
+          require 'time'
           core_path = "/tmp/core.#{Time.now.utc.iso8601}"
           warn "A core file is found. Saving it at: #{core_path.dump}"
           FileUtils.mv('core', core_path)
-- 
cgit v0.10.2


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

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