mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 18:13:58 +02:00
Merge RubyGems 3.2.2 and Bundler 2.2.2
This commit is contained in:
parent
34f0606217
commit
0e40cc9b19
Notes:
git
2020-12-18 13:33:46 +09:00
16 changed files with 175 additions and 40 deletions
|
@ -38,7 +38,7 @@ class Gem::FakeFetcher
|
|||
@paths = []
|
||||
end
|
||||
|
||||
def find_data(path, nargs = 3)
|
||||
def find_data(path)
|
||||
return Gem.read_binary path.path if URI === path and 'file' == path.scheme
|
||||
|
||||
if URI === path and "URI::#{path.scheme.upcase}" != path.class.name
|
||||
|
@ -54,10 +54,11 @@ class Gem::FakeFetcher
|
|||
raise Gem::RemoteFetcher::FetchError.new("no data for #{path}", path)
|
||||
end
|
||||
|
||||
data = @data[path]
|
||||
|
||||
data.flatten! and return data.shift(nargs) if data.respond_to?(:flatten!)
|
||||
data
|
||||
if @data[path].kind_of?(Array) && @data[path].first.kind_of?(Array)
|
||||
@data[path].shift
|
||||
else
|
||||
@data[path]
|
||||
end
|
||||
end
|
||||
|
||||
def fetch_path(path, mtime = nil, head = false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue