I am currently trying to convert this ruby array:
[5, 7, 8, 1]
into this:
[[5], [7], [8], [1]]
What\'s th
There's nothing specifically wrong with what you're doing. I think they mean that to_a for a FixNum will be deprecated sometime in the future, which makes sense cause it's ambiguous what exactly to_a for a FixNum should do.
You could rewrite your line like this which would eliminate the error:
[5, 7, 8, 1].select { |element| element }.collect { |element| [element] }