[Groonga-commit] droonga/fluent-plugin-droonga at ef4e35f [master] Don't merge nil and other type object

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Jan 27 17:21:56 JST 2014


YUKI Hiroshi	2014-01-27 17:21:56 +0900 (Mon, 27 Jan 2014)

  New Revision: ef4e35f3c2441e22dd5cad0ba0b7fb3b2848d74a
  https://github.com/droonga/fluent-plugin-droonga/commit/ef4e35f3c2441e22dd5cad0ba0b7fb3b2848d74a

  Message:
    Don't merge nil and other type object

  Modified files:
    lib/droonga/plugin/collector/basic.rb

  Modified: lib/droonga/plugin/collector/basic.rb (+4 -0)
===================================================================
--- lib/droonga/plugin/collector/basic.rb    2014-01-27 17:15:50 +0900 (eacd68f)
+++ lib/droonga/plugin/collector/basic.rb    2014-01-27 17:21:56 +0900 (fc80e7e)
@@ -43,6 +43,10 @@ module Droonga
     end
 
     def reduce(deal, left_value, right_value)
+      if left_value.nil? || right_value.nil?
+        return right_value || left_value
+      end
+
       reduced_value = nil
 
       case deal["type"]
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index