Given an array like:
[1, 2, nil, nil, 3, nil, 4, 5, 6, nil, nil, nil]
id like to remove the nil's from the end of the array. Not hard to solve with some ugly loops, but I was hoping there was a Ruby way to do it.
Result: [1, 2, nil, nil, 3, nil, 4, 5, 6]