lib/fluent/plugin/out_flowcounter.rb in fluent-plugin-flowcounter-0.1.1 vs lib/fluent/plugin/out_flowcounter.rb in fluent-plugin-flowcounter-0.1.2
- old
+ new
@@ -49,10 +49,11 @@
def count_initialized(keys=nil)
if @aggregate == :all
{'count' => 0, 'bytes' => 0}
elsif keys
- Hash[[keys, [0]*(keys.length)].transpose]
+ values = Array.new(keys.length){|i| 0 }
+ Hash[[keys, values].transpose]
else
{}
end
end