Skip to content

Commit

Permalink
Don't unnecessarily loop twice through dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Dec 1, 2021
1 parent f1d33fa commit 06b4a79
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bundler/lib/bundler/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -634,15 +634,13 @@ def converge_sources
end

def converge_dependencies
changes = false

@dependencies.each do |dep|
if dep.source
dep.source = sources.get(dep.source)
end
end

changes = false

@dependencies.each do |dep|
unless locked_dep = @locked_deps[dep.name]
changes = true
next
Expand Down

0 comments on commit 06b4a79

Please sign in to comment.