Ruby array creation, Array.new vs []

前端 未结 5 2116
时光取名叫无心
时光取名叫无心 2020-12-03 02:49

What\'s the difference between these two statements? I use them in my rails app and to me it looks like they do the same thing

array_a = Array.new
array_b =          


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