Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Dependency#to_spec
to_spec
lib/rubygems/dependency.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/dependency.rb, line 312
def to_spec
matches = to_specs.compact
active = matches.find(&:activated?)
return active if active
unless prerelease?
# Consider prereleases only as a fallback
pre, matches = matches.partition {|spec| spec.version.prerelease? }
matches = pre if matches.empty?
end
matches.first
end
No documentation available