Commit c3fff1389a69972c5c2b332429291e70d02b2f85
1 parent
8c5ebe20
Exists in
master
and in
3 other branches
Added missing line
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
lib/groupdate/magic.rb
@@ -149,6 +149,7 @@ module Groupdate | @@ -149,6 +149,7 @@ module Groupdate | ||
149 | if missing_time_zone_support | 149 | if missing_time_zone_support |
150 | raise Groupdate::Error, "Be sure to install time zone support - https://github.com/ankane/groupdate#for-mysql" | 150 | raise Groupdate::Error, "Be sure to install time zone support - https://github.com/ankane/groupdate#for-mysql" |
151 | end | 151 | end |
152 | + result = Hash[result.map { |k, v| [multiple_groups ? k[0...@group_index] + [cast_method.call(k[@group_index])] + k[(@group_index + 1)..-1] : cast_method.call(k), v] }] | ||
152 | 153 | ||
153 | series(result, (options.key?(:default_value) ? options[:default_value] : 0), multiple_groups, reverse) | 154 | series(result, (options.key?(:default_value) ? options[:default_value] : 0), multiple_groups, reverse) |
154 | end | 155 | end |