summaryrefslogtreecommitdiff
path: root/lib/rubygems/source.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-08-28 10:16:21 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-10-06 10:10:42 +0900
commit29c54b5e03f2d96f1387f77f34f77b62caddbef4 (patch)
treebc8183f4a000af9fabb7d682ea535bd04d85d4e4 /lib/rubygems/source.rb
parent49bfd889761765d96f6ee6b346609b0ddccb7822 (diff)
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.
Diffstat (limited to 'lib/rubygems/source.rb')
-rw-r--r--lib/rubygems/source.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rubygems/source.rb b/lib/rubygems/source.rb
index bed9c51346..ef232ff35d 100644
--- a/lib/rubygems/source.rb
+++ b/lib/rubygems/source.rb
@@ -179,7 +179,10 @@ class Gem::Source
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?