lib/user_agent/version.rb in useragent-0.5.0 vs lib/user_agent/version.rb in useragent-0.6.0
- old
+ new
@@ -65,16 +65,18 @@
else
return a <=> b
end
end
0
+ elsif to_s == other.to_s
+ return 0
else
- to_s == other.to_s ? 0 : nil
+ return -1
end
when String
self <=> self.class.new(other)
else
- raise ArgumentError, "comparison of Version with #{other.inspect} failed"
+ nil
end
end
def to_s
to_str