How to initialize an array in one step using Ruby?

后端 未结 9 732
情话喂你
情话喂你 2021-01-30 00:08

I initialize an array this way:

array = Array.new
array << \'1\' << \'2\' << \'3\'

Is it possible to do that in one s

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