Flowdock
method

handle_conflict

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: Resolver

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2_2_9) is shown here.

handle_conflict(dep, existing) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/resolver.rb, line 224
  def handle_conflict(dep, existing) # :nodoc:
    # There is a conflict! We return the conflict object which will be seen by
    # the caller and be handled at the right level.

    # If the existing activation indicates that there are other possibles for
    # it, then issue the conflict on the dependency for the activation itself.
    # Otherwise, if there was a requester, issue it on the requester's
    # request itself.
    # Finally, if the existing request has no requester (toplevel) unwind to
    # it anyway.

    if existing.others_possible?
      conflict =
        Gem::Resolver::Conflict.new dep, existing
    elsif dep.requester
      depreq = dep.requester.request
      conflict =
        Gem::Resolver::Conflict.new depreq, existing, dep
    elsif existing.request.requester.nil?
      conflict =
        Gem::Resolver::Conflict.new dep, existing
    else
      raise Gem::DependencyError, "Unable to figure out how to unwind conflict"
    end

    @conflicts << conflict unless @conflicts.include? conflict

    return conflict
  end
Register or log in to add new notes.