Navigation Menu

Skip to content

Commit

Permalink
Support comparison of Address with String
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 30, 2015
1 parent c1f2ebf commit be6695c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/droonga/address.rb
Expand Up @@ -68,6 +68,9 @@ def to_a
end

def ==(other)
if other.is_a?(String)
return to_s == other
end
other.is_a?(self.class) and to_a == other.to_a
end
end
Expand Down

0 comments on commit be6695c

Please sign in to comment.