End of Life Ruby 3.2 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.2.0/lib/rubygems/version.rb, line 173
def self.correct?(version)
nil_versions_are_discouraged! if version.nil?
!!(version.to_s =~ ANCHORED_VERSION_PATTERN)
end
True if the version string matches RubyGems’ requirements.