From: Janko Muzykant Date: 2011-12-12T19:31:22+09:00 Subject: How to create Arrays (and Hashes) correctly? hi, As far as I know, I can create Arrays and Hashes in Ruby at least in two ways, either by: a = [] or by: a = Array.new I'm coming from JavaScript world and in JS the first form is prefered over the second one. Is there any difference in Arrays (and Hashes) created in Ruby by [] (and {} respectively) and Array.new (Hash.new) ? I tried to answer myself searching in google and the only conclusion I found is that, when creating arrays with elements, one should use: a = ["Ala", "ma", "kota"] but on the other hand, for empty array with element added dynamically later, following form is more accurate: a = Array.new # not a = [] a.push(...) Is that right, or have I misunderstood something here? thanks, jm.