lib/r10k/semver.rb in r10k-1.3.5 vs lib/r10k/semver.rb in r10k-1.4.0
- old
+ new
@@ -2,10 +2,11 @@
# We need to subclass Numeric to force range comparisons not to try to iterate over SemVer
# and instead use numeric comparisons (eg >, <, >=, <=)
# Ruby 1.8 already did this for all ranges, but Ruby 1.9 changed range include behavior
module R10K
+# :nocov:
class SemVer < Numeric
include Comparable
VERSION = /^v?(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z-]*|)$/
SIMPLE_RANGE = /^v?(\d+|[xX])(?:\.(\d+|[xX])(?:\.(\d+|[xX]))?)?$/
@@ -121,6 +122,7 @@
MAX = SemVer.new('8.0.0')
MAX.instance_variable_set(:@major, (1.0/0)) # => Infinity
MAX.instance_variable_set(:@vstring, 'vMAX')
end
+# :nocov:
end