diff options
author | Homu <homu@barosl.com> | 2016-11-14 13:51:15 +0900 |
---|---|---|
committer | Homu <homu@barosl.com> | 2016-11-14 13:51:15 +0900 |
commit | 9fe5810adbab828c81591b664fbd3a0ea9af481b (patch) | |
tree | bdcc40e7cedb4394129fe19713107a8253ce185a | |
parent | 27bdbcfa73f6387e0d8d9e16768a0052d209a1fd (diff) | |
parent | fa2fd9bee9f7075d45aa105378391abe0d83b6e9 (diff) | |
download | bundler-9fe5810adbab828c81591b664fbd3a0ea9af481b.tar.gz |
Auto merge of #5165 - bundler:seg-molinillo-0.5.4, r=segiddins
Update vendored Molinillo to 0.5.4
See https://github.com/CocoaPods/Molinillo/releases/0.5.4
-rw-r--r-- | lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb | 2 | ||||
-rw-r--r-- | lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb | 22 |
2 files changed, 13 insertions, 11 deletions
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb b/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb index 1880df2e10..7b3065236b 100644 --- a/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +++ b/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Bundler::Molinillo # The version of Bundler::Molinillo. - VERSION = '0.5.3'.freeze + VERSION = '0.5.4'.freeze end diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb b/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb index 2686a8ee70..da1ac5aef0 100644 --- a/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +++ b/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb @@ -194,18 +194,20 @@ module Bundler::Molinillo def state_index_for_unwind current_requirement = requirement existing_requirement = requirement_for_existing_name(name) - until current_requirement.nil? - current_state = find_state_for(current_requirement) - return states.index(current_state) if state_any?(current_state) - current_requirement = parent_of(current_requirement) + index = -1 + [current_requirement, existing_requirement].each do |r| + until r.nil? + current_state = find_state_for(r) + if state_any?(current_state) + current_index = states.index(current_state) + index = current_index if current_index > index + break + end + r = parent_of(r) + end end - until existing_requirement.nil? - existing_state = find_state_for(existing_requirement) - return states.index(existing_state) if state_any?(existing_state) - existing_requirement = parent_of(existing_requirement) - end - -1 + index end # @return [Object] the requirement that led to `requirement` being added |