I am currently trying to convert this ruby array:
[5, 7, 8, 1]
into this:
[[5], [7], [8], [1]]
I am currently doing it like this:
[5, 7, 8, 1].select { |element| element }.collect { |element| element.to_a }
but I'm getting the following warning:
warning: default `to_a' will be obsolete