Constants
No documentation available

This is needed for compatibility with older yaml gemspecs.

No documentation available
Class Methods

True if the version string matches RubyGems’ requirements.

Factory method to create a Version object. Input may be a Version or a String. Intended to simplify client code.

ver1 = Version.create('1.3.17')   # -> (Version object)
ver2 = Version.create(ver1)       # -> (ver1)

Constructs a Version from the version string. A version string is a series of digits or ASCII letters separated by dots.

Instance Methods

Compares this version with other returning -1, 0, or 1 if the other version is larger, the same, or smaller than this one. other must be an instance of Gem::Version, comparing with other types may raise an exception.

A recommended version for use with a ~> Requirement.

Return a new version object where the next to the last revision number is one greater (e.g., 5.3.1 => 5.4).

Pre-release (alpha) parts, e.g, 5.3.1.b.2 => 5.4, are ignored.

remove trailing zeros segments before first letter or at the end of the version

A Version is only eql? to another version if it’s specified to the same precision. Version “1.0” is not the same as version “1”.

No documentation available

Dump only the raw version string, not the complete object. It’s a string for backwards (RubyGems 1.3.5 and earlier) compatibility.

Load custom marshal format. It’s a string for backwards (RubyGems 1.3.5 and earlier) compatibility.

No documentation available

A version is considered a prerelease if it contains a letter.

The release for this version (e.g. 1.2.0.a -> 1.2.0). Non-prerelease versions return themselves.

No documentation available
An alias for

A string representation of this Version.