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

18 lines
385 B
Ruby
Raw Normal View History

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