From: William Djaja Tjokroaminata Date: 2002-01-26T04:12:11+09:00 Subject: Re: Serious Array Bug in Ruby 1.6.6? Wow, this is quite a revelation! Probably I should have given the example Array.new(2, 125). Honestly, do you think that this behavior is a good thing? When we think of an array, it should be a list of several (preferebly different) objects. However, in Ruby, because of the constructor behavior, we can easily create an array that points to a single object. I raise my case, then, the array constructor should be changed. Because although you gave me a good example, did you ever really use it in your real-life code? Mr. Matz, do you know whether people really depends on the current array constructor behavior where array members really point to a single object? (In my opinion, this "feature" is quite comparable to other pitfalls in C/C++ language. To me Ruby is relatively free from these, until now.) Regards, Bill ==================================================================== > no, you have the same problem with String > pigeon% ruby -e 'a = Array.new(2, "a"); a[0][0] = "b"; p a' > ["b", "b"] > pigeon% > Guy Decoux