< Ruby Programming < Reference < Objects
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]
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.