Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem.latest_spec_for
(::String name) -> ::Gem::Specification?
latest_spec_for(name)
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems.rb, line 937
def self.latest_spec_for(name)
dependency = Gem::Dependency.new name
fetcher = Gem::SpecFetcher.fetcher
spec_tuples, = fetcher.spec_for_dependency dependency
spec, = spec_tuples.last
spec
end
Returns the latest release-version specification for the gem name.
See also
.latest_rubygems_version
.latest_version_for
.java_platform?
.load_bundler_extensions
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0