How to “unflatten” a Ruby Array?

前端 未结 5 1516
名媛妹妹
名媛妹妹 2020-12-11 05:39

I am currently trying to convert this ruby array:

[5, 7, 8, 1]

into this:

[[5], [7], [8], [1]]

What\'s th

5条回答
提交回复
热议问题