class Gem::Dependency

def to_specs

def to_specs
  matches = matching_specs true
  # TODO: check Gem.activated_spec[self.name] in case matches falls outside
  if matches.empty?
    specs = Gem::Specification.stubs_for name
    if specs.empty?
      raise Gem::MissingSpecError.new name, requirement
    else
      raise Gem::MissingSpecVersionError.new name, requirement, specs
    end
  end
  # TODO: any other resolver validations should go here
  matches
end