* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.6.2.

Please see entries of 2.6.2 on
  https://github.com/rubygems/rubygems/blob/master/History.txt

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2016-03-28 02:26:39 +00:00
parent 6cc4937aec
commit 7fbb9078fe
13 changed files with 179 additions and 27 deletions

View file

@ -286,7 +286,9 @@ class Gem::Dependency
}
end
matches.sort_by { |s| s.sort_obj } # HACK: shouldn't be needed
# `stubs_for` returns oldest first, but `matching_specs` is supposed to
# return newest first, so just reverse the list
matches.reverse
end
##
@ -302,14 +304,13 @@ class Gem::Dependency
# TODO: check Gem.activated_spec[self.name] in case matches falls outside
if matches.empty? then
specs = Gem::Specification.find_all { |s|
s.name == name
}.map { |x| x.full_name }
specs = Gem::Specification.stubs_for name
if specs.empty?
total = Gem::Specification.to_a.size
total = Gem::Specification.stubs.size
msg = "Could not find '#{name}' (#{requirement}) among #{total} total gem(s)\n".dup
else
specs = specs.map(&:full_name)
msg = "Could not find '#{name}' (#{requirement}) - did find: [#{specs.join ','}]\n".dup
end
msg << "Checked in 'GEM_PATH=#{Gem.path.join(File::PATH_SEPARATOR)}', execute `gem env` for more information"
@ -334,6 +335,6 @@ class Gem::Dependency
matches.delete_if { |spec| spec.nil? || spec.version.prerelease? } unless prerelease?
matches.last
matches.first
end
end