rails/rails — pull request #14789 by klebervirgilio (2014-04-17 18:55:31+00:00)
Title: Add Array#in_columns_of method

Hi Folks,

Today, I have faced a simple problem/challenge that might be useful for the community in general.

Given a array `[1,2,3,3,4,5,5,6,7,8,9,10]` I would like to split or iterate over it by columns and NOT groups.

I mean, instead of groups of 4 elements each(or not depending if the `fill_with` parameter is `false` or not ), like: `[[1,2,3,4], [5,6,7,8], [9, 10, ?, ?]]`

I'd like to split/iterate over:
```ruby
[
[1, 5, 9],
[2, 6, 10],
[3, 7],
[4, 8]
]
```

So, in order to do that added the `in_columns_of` method to Array.

Hopefully, it makes sense.
Thanks!