From 0a7099a0ae91401ae02199b25a0b6a4d10cc1143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 19 Nov 2024 20:43:21 +0100 Subject: [PATCH] [rubygems/rubygems] Extract a `source` local https://github.com/rubygems/rubygems/commit/c5a9449069 --- lib/bundler/definition.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 65c6d27823..4f620bdd27 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -960,11 +960,12 @@ module Bundler s.source = default_source unless sources.get(lockfile_source) end - next if @sources_to_unlock.include?(s.source.name) + source = s.source + next if @sources_to_unlock.include?(source.name) # Path sources have special logic - if s.source.instance_of?(Source::Path) || s.source.instance_of?(Source::Gemspec) - new_spec = s.source.specs[s].first + if source.instance_of?(Source::Path) || source.instance_of?(Source::Gemspec) + new_spec = source.specs[s].first if new_spec s.dependencies.replace(new_spec.dependencies) else