@return [Integer] The index to which the
resolution should unwind in the
caseofconflict.
# File lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb, line 194
def state_index_for_unwind
current_requirement = requirement
existing_requirement = requirement_for_existing_name(name)
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
index
end