Constructs a Version
from the version string.
A version string is a series of
digits or ASCII letters separated by dots.
# File lib/rubygems/version.rb, line 206
def initialize version
unless self.class.correct?(version)
raise ArgumentError, "Malformed version number string #{version}"
end
# If version is an empty string convert it to 0
version = 0 if version =~ /\A\s*\Z/
@version = version.to_s.strip.gsub("-",".pre.")
@segments = nil
end