def initialize specs_or_dirs = []
    @gems = {}
    @spec_dirs = nil

    case specs_or_dirs
    when Hash then
      specs_or_dirs.each do |full_name, spec|
        add_spec spec
      end
    when Array, String then
      self.spec_dirs = Array(specs_or_dirs)
      refresh!
    else
      arg = specs_or_dirs.inspect
      warn "NOTE: SourceIndex.new(#{arg}) is deprecated; From #{caller.first}."
    end
  end
#
Constructs a source index instance from the provided specifications, which
is a Hash of gem full names and Gem::Specifications.