End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem::Specification.add_spec
add_spec(spec)
lib/rubygems/specification.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/rubygems/specification.rb, line 889
def self.add_spec(spec)
return if _all.include? spec
_all << spec
stubs << spec
(@@stubs_by_name[spec.name] ||= []) << spec
_resort!(@@stubs_by_name[spec.name])
_resort!(stubs)
end
Adds spec to the known specifications, keeping the collection properly sorted.