josh/useragent — pull request #56 by mkilling (2013-05-12 00:45:42+00:00)
Title: Fix bug: Version string 5.1 and 5.1.0 are now eql

Fix a bug that caused versions that had added zeroes and versions which
had no added zeroes to return false for `eql?`.
This was inconsistent with the operators <=, >= and <=> which all returned
equal.

Before:

UserAgent::Version.new("6.1") == UserAgent::Version.new("6.1.0")
=> false
UserAgent::Version.new("6.1") <=> UserAgent::Version.new("6.1.0")
=> 0

After:

UserAgent::Version.new("6.1") == UserAgent::Version.new("6.1.0")
=> true
UserAgent::Version.new("6.1") <=> UserAgent::Version.new("6.1.0")
=> 0