Ruby Programming/Reference/Objects/Array

Class Methods

 Method: [ ]        Signature: Array[ [anObject]* ] -> anArray

Creates a new array whose elements are given between [ and ].

 Array.[]( 1, 2, 3 ) -> [1,2,3]
 Array[ 1, 2, 3 ] -> [1,2,3]
 [1,2,3] -> [1,2,3]
Last modified on 2 May 2009, at 04:35