From: huang zhimin Date: 2007-06-10T12:13:18+09:00 Subject: Strange behavior of Array ------=_Part_63921_22926182.1181445198812 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I want a multidimensional array with initial value 0, so I create it by arr = Array.new(3, Array.new(3, 0)) => [[0, 0, 0], [0, 0, 0], [0, 0, 0]] now I change the arr[0][0] to 1 arr[0][0] = 1 arr => [[1, 0, 0], [1, 0, 0], [1, 0, 0]] It's so strange for me, why it's not [[1, 0, 0], [0, 0, 0], [0, 0, 0]] -- http://sourceforge.net/projects/mycodeline/ ------=_Part_63921_22926182.1181445198812--