diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-01 23:29:38 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-01 23:29:38 +0000 |
commit | be7b5929126cb3e696ef222339237faba9b8fe5a (patch) | |
tree | 51eae376f93c09bc82dde5a657a91df2c89062e4 /lib/bundler/spec_set.rb | |
parent | ae49dbd392083f69026f2a0fff4a1d5f42d172a7 (diff) | |
download | ruby-be7b5929126cb3e696ef222339237faba9b8fe5a.tar.gz |
Update bundled bundler to 1.16.0.
* lib/bundler, spec/bundler: Merge bundler-1.16.0.
* common.mk: rspec examples of bundler-1.16.0 needs require option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/bundler/spec_set.rb')
-rw-r--r-- | lib/bundler/spec_set.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb index 9642633578..7cd3021997 100644 --- a/lib/bundler/spec_set.rb +++ b/lib/bundler/spec_set.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "tsort" require "forwardable" require "set" @@ -76,7 +77,7 @@ module Bundler end def materialize(deps, missing_specs = nil) - materialized = self.for(deps, [], false, true, missing_specs).to_a + materialized = self.for(deps, [], false, true, !missing_specs).to_a deps = materialized.map(&:name).uniq materialized.map! do |s| next s unless s.is_a?(LazySpecification) @@ -109,9 +110,10 @@ module Bundler def merge(set) arr = sorted.dup - set.each do |s| - next if arr.any? {|s2| s2.name == s.name && s2.version == s.version && s2.platform == s.platform } - arr << s + set.each do |set_spec| + full_name = set_spec.full_name + next if arr.any? {|spec| spec.full_name == full_name } + arr << set_spec end SpecSet.new(arr) end |