[Groonga-commit] droonga/droonga-engine at be6695c [master] Support comparison of Address with String

Zurück zum Archiv-Index

YUKI Hiroshi null+****@clear*****
Thu Apr 30 11:17:24 JST 2015


YUKI Hiroshi	2015-04-30 11:17:24 +0900 (Thu, 30 Apr 2015)

  New Revision: be6695c3d676f812cefd1e320df7a28c33a58963
  https://github.com/droonga/droonga-engine/commit/be6695c3d676f812cefd1e320df7a28c33a58963

  Message:
    Support comparison of Address with String

  Modified files:
    lib/droonga/address.rb

  Modified: lib/droonga/address.rb (+3 -0)
===================================================================
--- lib/droonga/address.rb    2015-04-30 11:03:05 +0900 (f1a2635)
+++ lib/droonga/address.rb    2015-04-30 11:17:24 +0900 (aab29d5)
@@ -68,6 +68,9 @@ module Droonga
     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
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index