* lib/rubygems: Update to Rubygems 2.0.9. [ruby-core:57183]

[Backport #8908]
  the patch is provided by drbrain (Eric Hodel).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@42947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2013-09-15 14:23:26 +00:00
parent 9aab347c15
commit 72fb9d16dc
8 changed files with 65 additions and 17 deletions

View file

@ -43,12 +43,13 @@ class Gem::Commands::FetchCommand < Gem::Command
dep.prerelease = options[:prerelease]
specs_and_sources, errors = Gem::SpecFetcher.fetcher.spec_for_dependency dep
if platform then
filtered = specs_and_sources.select { |s,| s.platform == platform }
specs_and_sources = filtered unless filtered.empty?
end
spec, source = specs_and_sources.sort_by { |s,| s.version }.first
spec, source = specs_and_sources.max_by { |s,| s.version }
if spec.nil? then
show_lookup_failure gem_name, version, errors, options[:domain]