correct?(version)
True if the version string matches RubyGems’ requirements.
# File lib/rubygems/version.rb, line 172 def self.correct? version !!(version.to_s =~ ANCHORED_VERSION_PATTERN) end