Tim Pease wrote:
> This is a very good question -- a classic in the ruby-talk archives.
> 
> If you do a search through the ruby-talk archives, you will find some
> very enlightening answers. Please post back the thread number that was
> most informative for you (just to help others who will ask this same
> question again in the future).
> 
> Also, read the documentation for Array.new until you grok what it is
> saying. Meditate until enlightenment is achieved.
> 
> Blessings,
> TwP

Thanks Tim,

I found (among others)
http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/99825?99645-100666

Also, I read the documentation for Array.new again. In fact, I was 
reading it before posting, but I guess the human brain (or at least 
mine) is pre-conditioned to read what it "believes".

Frankly, just as the poster in ruby-talk I have my troubles accepting 
this not being a violation of the principle of least surprise (and yes, 
I come from a C programming background).
Anyhow, now I know it and (hopefully) will remember it the next time. I 
still have not glue why one would want an array whose elements are 
referencing the same object. Does anybody know an example where this is 
actually useful?

Armin
-- 
Posted via http://www.ruby-forum.com/.