End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem::Version.correct?
correct?(version)
lib/rubygems/version.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems/version.rb, line 172
def self.correct?(version)
unless Gem::Deprecate.skip
warn "nil versions are discouraged and will be deprecated in Rubygems 4" if version.nil?
end
!!(version.to_s =~ ANCHORED_VERSION_PATTERN)
end
True if the version string matches RubyGems’ requirements.