array_groups 0.0.7
[1,2,3,4,5].in_groups(2) => [ [1,2,3], [4,5] ] ------------------------------------------------------- [1,2,3,4,5].in_groups_of(2) => [ [1,2], [3,4], [5] ] ------------------------------------------------------- [1,2,3,4,5].in_groups_of(2, nil_fill: true) => [ [1,2], [3,4], [5,nil] ] ------------------------------------------------------- This allows the grouping of an array into different "parts". Great for threading long arrays or making them rectanglar.