downloader.rb: utilize dir argument

* tool/downloader.rb (Downloader::RubyGems.download): utilize
  `dir` argument of Downloader.download.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-05-21 08:30:50 +00:00
parent b4c2008817
commit 70b9957689

View File

@ -62,8 +62,7 @@ class Downloader
options = options.dup
verify = options.delete(:verify) {Gem::VERSION >= "2.4."}
options[:ssl_ca_cert] = Dir.glob(File.expand_path("../lib/rubygems/ssl_certs/**/*.pem", File.dirname(__FILE__)))
file = under(dir, name)
super("https://rubygems.org/downloads/#{name}", file, nil, since, options) or
super("https://rubygems.org/downloads/#{name}", name, dir, since, options) or
return false
return true unless verify
end