From: Paul Harrington Date: 2010-02-11T10:37:06+09:00 Subject: Re: difference between 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. -- Posted via http://www.ruby-forum.com/.