mirror of
https://github.com/ruby/ruby.git
synced 2026-01-28 04:54:23 +00:00
[rubygems/rubygems] rename Index#== to Index#subset?
https://github.com/rubygems/rubygems/commit/a96a561087
This commit is contained in:
parent
92f23a48e3
commit
6362bfdc33
@ -657,8 +657,7 @@ module Bundler
|
||||
locked_index = Index.new
|
||||
locked_index.use(@locked_specs.select {|s| source.can_lock?(s) })
|
||||
|
||||
# order here matters, since Index#== is checking source.specs.include?(locked_index)
|
||||
locked_index != source.specs
|
||||
!locked_index.subset?(source.specs)
|
||||
rescue PathError, GitError => e
|
||||
Bundler.ui.debug "Assuming that #{source} has not changed since fetching its specs errored (#{e})"
|
||||
false
|
||||
|
||||
@ -145,8 +145,7 @@ module Bundler
|
||||
end
|
||||
|
||||
# Whether all the specs in self are in other
|
||||
# TODO: rename to #include?
|
||||
def ==(other)
|
||||
def subset?(other)
|
||||
all? do |spec|
|
||||
other_spec = other[spec].first
|
||||
other_spec && dependencies_eql?(spec, other_spec) && spec.source == other_spec.source
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user