diff options
-rw-r--r-- | lib/ipaddr.rb | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -149,7 +149,10 @@ class IPAddr # Returns true if two ipaddrs are equal. def ==(other) other = coerce_other(other) - return @family == other.family && @addr == other.to_i end # Returns a new ipaddr built by masking IP address with the given @@ -335,10 +338,10 @@ class IPAddr # Compares the ipaddr with another. def <=>(other) other = coerce_other(other) - - return nil if other.family != @family - - return @addr <=> other.to_i end include Comparable |