Commit 7347afca902557e4c9acf584a121035e25cadda3
1 parent
791b0bfb
Exists in
master
and in
8 other branches
Fixes error when using to `group_by_*`
Series was a range and needed to be converted to an array, this same conversion was done a couple of lines below. Closes #114
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/groupdate/magic.rb
... | ... | @@ -222,7 +222,7 @@ module Groupdate |
222 | 222 | series = |
223 | 223 | if multiple_groups |
224 | 224 | keys = count.keys.map { |k| k[0...@group_index] + k[(@group_index + 1)..-1] }.uniq |
225 | - series = series.reverse if reverse | |
225 | + series = series.to_a.reverse if reverse | |
226 | 226 | keys.flat_map do |k| |
227 | 227 | series.map { |s| k[0...@group_index] + [s] + k[@group_index..-1] } |
228 | 228 | end | ... | ... |