lib/semantic_range/version.rb in semantic_range-2.3.1 vs lib/semantic_range/version.rb in semantic_range-3.0.0

- old
+ new

@@ -1,12 +1,12 @@ module SemanticRange - VERSION = "2.3.1" + VERSION = "3.0.0" class Version attr_reader :major, :minor, :patch, :prerelease - def initialize(version, loose = false) + def initialize(version, loose: false) @raw = version @loose = loose @raw = version.raw if version.is_a?(Version) @@ -43,16 +43,16 @@ def raw version end def compare(other) - other = Version.new(other, @loose) unless other.is_a?(Version) + other = Version.new(other, loose: @loose) unless other.is_a?(Version) res = truthy(compare_main(other)) || truthy(compare_pre(other)) res.is_a?(FalseClass) ? 0 : res end def compare_main(other) - other = Version.new(other, @loose) unless other.is_a?(Version) + other = Version.new(other, loose: @loose) unless other.is_a?(Version) truthy(self.class.compare_identifiers(@major, other.major)) || truthy(self.class.compare_identifiers(@minor, other.minor)) || truthy(self.class.compare_identifiers(@patch, other.patch)) end