From a4860e043e073e9caa2494284df4af10ca6550da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 24 Aug 2022 08:39:00 +0200 Subject: [PATCH] [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 --- lib/bundler/spec_set.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb index 1d0b7a460d..21d57fdab4 100644 --- a/lib/bundler/spec_set.rb +++ b/lib/bundler/spec_set.rb @@ -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