diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 9fc733203c..6c7a3e9c38 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -645,20 +645,12 @@ module Bundler end 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 resolve.materialize(dependencies) rescue IncorrectLockfileDependencies => e raise if Bundler.frozen_bundle? - spec = e.spec - raise "Infinite loop while fixing lockfile dependencies" if incorrect_spec == spec - - incorrect_spec = spec - reresolve_without([spec]) + reresolve_without([e.spec]) retry end