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

ruby-changes:63276

From: David <ko1@a...>
Date: Tue, 6 Oct 2020 10:11:27 +0900 (JST)
Subject: [ruby-changes:63276] 29c54b5e03 (master): Add missing fileutils require

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

From 29c54b5e03f2d96f1387f77f34f77b62caddbef4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Fri, 28 Aug 2020 10:16:21 +0200
Subject: Add missing fileutils require

On my system, the error was being hidden by the presence of a YARD
rubygems plugin that was providing the require and making things work.

diff --git a/lib/rubygems/source.rb b/lib/rubygems/source.rb
index bed9c51..ef232ff 100644
--- a/lib/rubygems/source.rb
+++ b/lib/rubygems/source.rb
@@ -179,7 +179,10 @@ class Gem::Source https://github.com/ruby/ruby/blob/trunk/lib/rubygems/source.rb#L179
     local_file = File.join(cache_dir, file_name)
     retried    = false
 
-    FileUtils.mkdir_p cache_dir if update_cache?
+    if update_cache?
+      require "fileutils"
+      FileUtils.mkdir_p cache_dir
+    end
 
     spec_dump = fetcher.cache_update_path spec_path, local_file, update_cache?
 
-- 
cgit v0.10.2


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

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