if use Array.new(size, TargetClass.new(...))
Then all the element of this array POINT to the same object
Then modified one entry will result the modification to others
My solution is
a = Array.new(size)
for i in 0...size
a[i].new(...)
end
can it be improved?
Labels: tips