lib/rubygems/dependency_resolver.rb in rubygems-update-2.1.9 vs lib/rubygems/dependency_resolver.rb in rubygems-update-2.1.10
- old
+ new
@@ -116,11 +116,11 @@
# If the existing activation indicates that there
# are other possibles for it, then issue the conflict
# on the dep for the activation itself. Otherwise, issue
# it on the requester's request itself.
#
- if existing.others_possible?
+ if existing.others_possible? or existing.request.requester.nil? then
conflict =
Gem::DependencyResolver::DependencyConflict.new dep, existing
else
depreq = existing.request.requester.request
conflict =
@@ -130,20 +130,20 @@
return conflict
end
# Get a list of all specs that satisfy dep and platform
- possible = @set.find_all dep
- possible = select_local_platforms possible
+ all_possible = @set.find_all dep
+ possible = select_local_platforms all_possible
case possible.size
when 0
@missing << dep
unless @soft_missing
# If there are none, then our work here is done.
- raise Gem::UnsatisfiableDependencyError, dep
+ raise Gem::UnsatisfiableDependencyError.new dep, all_possible
end
when 1
# If there is one, then we just add it to specs
# and process the specs dependencies by adding
# them to needed.
@@ -232,10 +232,10 @@
##
# Returns the gems in +specs+ that match the local platform.
def select_local_platforms specs # :nodoc:
specs.select do |spec|
- Gem::Platform.match spec.platform
+ Gem::Platform.installable? spec
end
end
end