method

Array

Importance_1
Ruby latest stable (v1_8_7_72) - 0 notes - Class: Kernel
Array(p1) public

Returns arg as an Array. First tries to call arg.to_ary, then arg.to_a. If both fail, creates a single element array containing arg (unless arg is nil).

   Array(1..5)   #=> [1, 2, 3, 4, 5]
Show source
Register or log in to add new notes.