lib/semantic/version.rb in semantic-1.3.0 vs lib/semantic/version.rb in semantic-1.3.1
- old
+ new
@@ -76,11 +76,11 @@
(self <=> other_version) == 0
end
def satisfies other_version
return true if other_version.strip == '*'
- parts = other_version.split /(\d(.+)?)/, 2
+ parts = other_version.split(/(\d(.+)?)/, 2)
comparator, other_version_string = parts[0].strip, parts[1].strip
begin
Version.new other_version_string
comparator.empty? && comparator = '=='
@@ -103,10 +103,10 @@
end
parts.join '.'
end
def tilde_matches? other_version_string
- this_parts = to_a.collect &:to_s
+ this_parts = to_a.collect(&:to_s)
other_parts = other_version_string.split('.').reject {|x| x == '*'}
other_parts == this_parts[0..other_parts.length-1]
end
def satisfies_comparator? comparator, other_version_string