Sha256: e2b608cce96d102a3ffec14896b83b919a03f7c197c6ee58ec4f4c20207eee56
Contents?: true
Size: 637 Bytes
Versions: 44
Compression:
Stored size: 637 Bytes
Contents
require 'rubygems/version' module PEBuild module Util # @api private # # @since 0.10.2 module VersionString # 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. # # @param a [String] The first version string. # @param b [String] The second version string. # # @return [Integer] A -1, 0 or 1. def self.compare(a, b) Gem::Version.new(a.split('-').first) <=> Gem::Version.new(b.split('-').first) end end end end
Version data entries
44 entries across 44 versions & 1 rubygems