class Bundler::Graph

def matching_specs platform_only = false

def matching_specs platform_only = false
  matches = Bundler.load.specs.select { |spec|
    self.name == spec.name and
      requirement.satisfied_by? spec.version
  }
  if platform_only
    matches.reject! { |spec|
      not Gem::Platform.match spec.platform
    }
  end
  matches = matches.sort_by { |s| s.sort_obj } # HACK: shouldn't be needed
end