Module: PEBuild::Util::VersionString Private
- Defined in:
- lib/pe_build/util/version_string.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
-
.compare(a, b) ⇒ Integer
private
Approximate comparison of two version strings using <=>.
Class Method Details
.compare(a, b) ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Approximate comparison of two version strings using <=>
Uses the Gem::Version class. Any nightly build tags, such as
-rc4-165-g9a98c9f
, will be stripped from the version.
19 20 21 |
# File 'lib/pe_build/util/version_string.rb', line 19 def self.compare(a, b) Gem::Version.new(a.split('-').first) <=> Gem::Version.new(b.split('-').first) end |