Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Gem::Dependency#to_spec
to_spec
lib/rubygems/dependency.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/rubygems/dependency.rb, line 324
def to_spec
matches = to_specs.compact
active = matches.find(&:activated?)
return active if active
unless prerelease?
# Move prereleases to the end of the list for >= 0 requirements
pre, matches = matches.partition {|spec| spec.version.prerelease? }
matches += pre if requirement == Gem::Requirement.default
end
matches.first
end
No documentation available