[rubygems/rubygems] Remove unnecessary endless loop detection

Fixes a TODO now that no reports have been reported in a while.

f10dc84e7b
This commit is contained in:
David Rodríguez 2025-07-25 12:14:09 +02:00 committed by Hiroshi SHIBATA
parent 862b30287a
commit e2fbd01714

View file

@ -645,20 +645,12 @@ module Bundler
end end
def materialize(dependencies) def materialize(dependencies)
# Tracks potential endless loops trying to re-resolve.
# TODO: Remove as dead code if not reports are received in a while
incorrect_spec = nil
specs = begin specs = begin
resolve.materialize(dependencies) resolve.materialize(dependencies)
rescue IncorrectLockfileDependencies => e rescue IncorrectLockfileDependencies => e
raise if Bundler.frozen_bundle? raise if Bundler.frozen_bundle?
spec = e.spec reresolve_without([e.spec])
raise "Infinite loop while fixing lockfile dependencies" if incorrect_spec == spec
incorrect_spec = spec
reresolve_without([spec])
retry retry
end end