Skip to content

Commit 28943c2

Browse files
deivid-rodriguezhsbt
authored andcommitted
[rubygems/rubygems] Refactor replacement of locked path sources
Instead of doing an explicit pass to preserve the source from the Gemfile when it's a `Source::Gemspec`, add a special case to our generic source replacement method. ruby/rubygems@20c8c42380
1 parent 164952c commit 28943c2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/bundler/definition.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -911,9 +911,6 @@ def converge_path_source_to_gemspec_source(source)
911911
end
912912

913913
def converge_path_sources_to_gemspec_sources
914-
@locked_sources.map! do |source|
915-
converge_path_source_to_gemspec_source(source)
916-
end
917914
@locked_specs.each do |spec|
918915
spec.source &&= converge_path_source_to_gemspec_source(spec.source)
919916
end

lib/bundler/source_list.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ def map_sources(replacement_sources)
183183
end
184184

185185
path = @path_sources.map do |source|
186+
next source if source.is_a?(Source::Gemspec)
187+
186188
replace_source(replacement_sources, source)
187189
end
188190

0 commit comments

Comments
 (0)