Remove bare return in reduce block.

Used `each_with_object` to keep the `[]=` semantics.