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

[rubygems/rubygems] Remove unnecessary spec sorting

Specs in a SpecSet with the same name are only sorted by platform
priority when they are read. No need to sort everything eagerly.

https://github.com/rubygems/rubygems/commit/aeafff52df
This commit is contained in:
David Rodríguez 2022-08-24 08:39:00 +02:00 committed by git
parent acc61cbf4a
commit a4860e043e

View file

@ -176,7 +176,7 @@ module Bundler
def lookup
@lookup ||= begin
lookup = Hash.new {|h, k| h[k] = [] }
Index.sort_specs(@specs).reverse_each do |s|
@specs.each do |s|
lookup[s.name] << s
end
lookup