class Gem::Resolver::IndexSet

def initialize(source = nil) # :nodoc:

:nodoc:
def initialize(source = nil) # :nodoc:
  super()
  @f =
    if source
      sources = Gem::SourceList.from [source]
      Gem::SpecFetcher.new sources
    else
      Gem::SpecFetcher.fetcher
    end
  @all = Hash.new {|h,k| h[k] = [] }
  list, errors = @f.available_specs :complete
  @errors.concat errors
  list.each do |uri, specs|
    specs.each do |n|
      @all[n.name] << [uri, n]
    end
  end
  @specs = {}
end