Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::SpecificationRecord#latest_spec_for
latest_spec_for(name)
lib/rubygems/specification_record.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/specification_record.rb, line 243
def latest_spec_for(name)
latest_specs(true).find {|installed_spec| installed_spec.name == name }
end
Return the latest installed spec in the record for gem name.