Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Gem::SpecificationRecord#add_spec
add_spec(spec)
lib/rubygems/specification_record.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/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 the record, keeping the collection properly sorted.