Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Prevent sources from pointing to a shared mutable dependency list
Browse files Browse the repository at this point in the history
  • Loading branch information
dubek authored and indirect committed Oct 20, 2014
1 parent 1eb62f2 commit 2f17e3e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/bundler/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,10 @@ def resolve

def index
@index ||= Index.build do |idx|
dependency_names = @dependencies.dup || []
dependency_names.map! {|d| d.name }
dependency_names = @dependencies.map { |d| d.name }

sources.all_sources.each do |s|
s.dependency_names = dependency_names
s.dependency_names = dependency_names.dup
idx.add_source s.specs
s.specs.each { |spec| dependency_names.delete(spec.name) }
dependency_names.push(*s.unmet_deps).uniq!
Expand Down

0 comments on commit 2f17e3e

Please sign in to comment.