Array Ruby Spris en groupes
a = [1, 2, 3, 4, 5, 6]
a.each_slice(3).to_a
# => [[1, 2, 3], [4, 5, 6]]
Lioruby
a = [1, 2, 3, 4, 5, 6]
a.each_slice(3).to_a
# => [[1, 2, 3], [4, 5, 6]]