summaryrefslogtreecommitdiff
path: root/lib/bundler/spec_set.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2023-03-16 17:45:54 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-04-06 13:07:16 +0900
commitf3d69bed626e3326959dd62dbcc9ac4510e42b2f (patch)
treef7d1ff117d67bcb4d0e2c14f5844c5fe0d9e2241 /lib/bundler/spec_set.rb
parentc257380965bcf93c9bef330faa6762ed0be494b5 (diff)
[rubygems/rubygems] Fix resolver hangs when dealing with an incomplete lockfile
While working on locking multiple platforms by default, I got an infinite resolution loop in one of our resolver specs. The culprit ended up being that when dealing with lockfile specs with incomplete dependencies (spec appears in lockfile, but its dependencies don't), those specs were not being properly expired and that tripped up resolution. The issue for some reason only manifests when dealing with multiple lockfile platforms, that's why it only manifested when working on locking multiple platforms by default. https://github.com/rubygems/rubygems/commit/4ca72913bb
Diffstat (limited to 'lib/bundler/spec_set.rb')
-rw-r--r--lib/bundler/spec_set.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index cf63c16a70..21630e3a3e 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -63,8 +63,8 @@ module Bundler
@sorted = nil
end
- def delete(spec)
- @specs.delete(spec)
+ def delete(specs)
+ specs.each {|spec| @specs.delete(spec) }
@lookup = nil
@sorted = nil
end