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