We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d052f6 commit 6695384Copy full SHA for 6695384
lib/esdb.rb
@@ -11,8 +11,8 @@ def initialize(stats)
11
values = 'avg'
12
elsif value.is_a?(Hash)
13
values = value.collect{|calc, conds|
14
- if conds[0].is_a?(Array)
15
- conds.collect{|_conds| "#{calc}:[#{_conds.join(',')}]"}.join(',')
+ if conds.collect(&:class).include?(Array)
+ conds.collect{|_conds| "#{calc}#{":[#{_conds.join(',')}]" if _conds.is_a?(Array)}"}.join(',')
16
else
17
"#{calc}:[#{conds.join(',')}]"
18
end
0 commit comments