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

[rubygems/rubygems] Add missing require 'fileutils' in Gem::ConfigFile

https://github.com/rubygems/rubygems/commit/c4004fadd9
This commit is contained in:
Masafumi Koba 2021-07-15 20:25:12 +09:00 committed by Hiroshi SHIBATA
parent 71d3c9bbfa
commit 650a65c6fc
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -320,7 +320,8 @@ if you believe they were disclosed to a third party.
config = load_file(credentials_path).merge(host => api_key)
dirname = File.dirname credentials_path
FileUtils.mkdir_p(dirname) unless File.exist? dirname
require 'fileutils'
FileUtils.mkdir_p(dirname)
Gem.load_yaml
@ -457,9 +458,8 @@ if you believe they were disclosed to a third party.
# Writes out this config file, replacing its source.
def write
unless File.exist?(File.dirname(config_file_name))
FileUtils.mkdir_p File.dirname(config_file_name)
end
require 'fileutils'
FileUtils.mkdir_p File.dirname(config_file_name)
File.open config_file_name, 'w' do |io|
io.write to_yaml