1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/rubygems/indexer/marshal_index_builder.rb
drbrain db74541efe Update to RubyGems 0.9.5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 05:56:43 +00:00

17 lines
385 B
Ruby

require 'rubygems/indexer'
# Construct the master Gem index file.
class Gem::Indexer::MarshalIndexBuilder < Gem::Indexer::MasterIndexBuilder
def end_index
gems = {}
index = Gem::SourceIndex.new
@index.each do |name, gemspec|
gems[gemspec.original_name] = gemspec
end
index.instance_variable_get(:@gems).replace gems
@file.write index.dump
end
end