def optimize_specs( specs )
      names     = {}
      versions  = {}
      platforms = {}

      specs.collect do |(name, version, platform)|
        names[name]         = name     unless names.include?( name )
        versions[version]   = version  unless versions.include?( version )
        platforms[platform] = platform unless platforms.include?( platform )

        [ names[name], versions[version], platforms[platform] ]
      end
    end
def optimize_specs( specs )
      names     = {}
      versions  = {}
      platforms = {}

      specs.collect do |(name, version, platform)|
        names[name]         = name     unless names.include?( name )
        versions[version]   = version  unless versions.include?( version )
        platforms[platform] = platform unless platforms.include?( platform )

        [ names[name], versions[version], platforms[platform] ]
      end
    end
Optimize the specs marshalling by using identical objects as much as possible.  this
 is take directly from RubyGems source code.  See rubygems/indexer.rb
 #compact_specs