summaryrefslogtreecommitdiff
path: root/lib/bundler/spec_set.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2021-02-01 16:17:16 +0100
committerHiroshi SHIBATA <[email protected]>2021-03-08 13:47:35 +0900
commit53468cc11147b0d285fc376fc546b677dad600ca (patch)
treeeb9c97f544d089be2d324126b025b11f41a22c90 /lib/bundler/spec_set.rb
parent2ab6b7a7516e1b2c48a66ce513afabb62d101461 (diff)
Sync latest development version of bundler & rubygems
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4143
Diffstat (limited to 'lib/bundler/spec_set.rb')
-rw-r--r--lib/bundler/spec_set.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index a0b9552c18..399c91fea5 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true
require "tsort"
-require "set"
module Bundler
class SpecSet
@@ -13,14 +12,16 @@ module Bundler
end
def for(dependencies, skip = [], check = false, match_current_platform = false, raise_on_missing = true)
- handled = Set.new
+ handled = []
deps = dependencies.dup
specs = []
skip += ["bundler"]
loop do
break unless dep = deps.shift
- next if !handled.add?(dep) || skip.include?(dep.name)
+ next if handled.include?(dep) || skip.include?(dep.name)
+
+ handled << dep
specs_for_dep = spec_for_dependency(dep, match_current_platform)
if specs_for_dep.any?
@@ -28,7 +29,7 @@ module Bundler
specs_for_dep.first.dependencies.each do |d|
next if d.type == :development
- d = DepProxy.new(d, dep.__platform) unless match_current_platform
+ d = DepProxy.get_proxy(d, dep.__platform) unless match_current_platform
deps << d
end
elsif check