YUKI Hiroshi
null+****@clear*****
Mon Jan 27 17:31:59 JST 2014
YUKI Hiroshi 2014-01-27 17:31:59 +0900 (Mon, 27 Jan 2014) New Revision: 54230953cf5a9b84b753ba5d9765f35fc194405d https://github.com/droonga/fluent-plugin-droonga/commit/54230953cf5a9b84b753ba5d9765f35fc194405d Message: Merge hashes simply for "sum" reducer Modified files: lib/droonga/plugin/collector/basic.rb Modified: lib/droonga/plugin/collector/basic.rb (+1 -5) =================================================================== --- lib/droonga/plugin/collector/basic.rb 2014-01-27 17:27:05 +0900 (9039e40) +++ lib/droonga/plugin/collector/basic.rb 2014-01-27 17:31:59 +0900 (1fbe13c) @@ -89,11 +89,7 @@ module Droonga return x || y if x.nil? or y.nil? if x.is_a?(Hash) && y.is_a?(Hash) - all_keys = (x.keys + y.keys).uniq - all_keys.each do |key| - x[key] = sum(x[key], y[key]) - end - x + x.merge(y) else x + y end -------------- next part -------------- HTML����������������������������... Download