aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/remote_fetcher.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/remote_fetcher.rb')
-rw-r--r--lib/rubygems/remote_fetcher.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb
index ba546ca926..e0d12987f3 100644
--- a/lib/rubygems/remote_fetcher.rb
+++ b/lib/rubygems/remote_fetcher.rb
@@ -85,7 +85,7 @@ class Gem::RemoteFetcher
return if found.empty?
- spec, source_uri = found.first
+ spec, source_uri = found.sort_by { |(s,_)| s.version }.last
download spec, source_uri
end