instance method
Gem::SpecificationRecord#add_spec
add_spec(spec)
lib/rubygems/specification_record.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/specification_record.rb, line 78
def add_spec(spec)
return if all.include? spec
all << spec
stubs << spec
(@stubs_by_name[spec.name] ||= []) << spec
Gem::Specification._resort!(@stubs_by_name[spec.name])
Gem::Specification._resort!(stubs)
end
Adds spec to the record, keeping the collection properly sorted.