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

[rubygems/rubygems] Use dependency.identity in available_specs

https://github.com/rubygems/rubygems/commit/bde88f00a1
This commit is contained in:
bronzdoc 2019-09-29 08:43:17 -06:00 committed by Nobuyoshi Nakada
parent b659c1b92f
commit 7d4ab8bbe7
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -88,19 +88,8 @@ class Gem::SpecFetcher
rejected_specs = {}
if dependency.prerelease?
if dependency.specific?
type = :complete
else
type = :abs_latest
end
elsif dependency.latest_version?
type = :latest
else
type = :released
end
list, errors = available_specs(dependency.identity)
list, errors = available_specs(type)
list.each do |source, specs|
if dependency.name.is_a?(String) && specs.respond_to?(:bsearch)
start_index = (0 ... specs.length).bsearch{ |i| specs[i].name >= dependency.name }