    # File lib/rubygems/spec_fetcher.rb, line 160
      def list(all = false)
        list = {}

        file = all ? 'specs' : 'latest_specs'

        Gem.sources.each do |source_uri|
          source_uri = URI.parse source_uri

          if all and @specs.include? source_uri then
            list[source_uri] = @specs[source_uri]
          elsif @latest_specs.include? source_uri then
            list[source_uri] = @latest_specs[source_uri]
          else
            specs = load_specs source_uri, file

            cache = all ? @specs : @latest_specs

            cache[source_uri] = specs
            list[source_uri] = specs
          end
        end

        list
      end