From: Albert Schlef Date: 2010-02-11T11:15:26+09:00 Subject: Re: difference between Paul Harrington wrote: > Albert Schlef wrote: >> Ryan Davis wrote: >>> Array[...] is, as you point out in the comment, a >>> method invocation to Array::[](*items). >> >> I don't think so. Array() is a method of the Kernel module. So, I think, >> `Array[1,2,3]` equals `Array( [1,2,3] )`. > > Array([1,2,3]) calls the Array kernel method on the Array created by [1, > 2, 3]. Array[1, 2, 3] calls the [] method on the Array class. Very > different. Right. Thanks for correcting me. -- Posted via http://www.ruby-forum.com/.