Ryan Davis wrote:
> ---------------------------------------------------------- Array#collect
>      array.collect {|item| block }  -> an_array
>      array.map     {|item| block }  -> an_array
> ------------------------------------------------------------------------
>      Invokes _block_ once for each element of _self_. Creates a new
>      array containing the values returned by the block. See also
>      +Enumerable#collect+.
> 
>         a = [ "a", "b", "c", "d" ]
>         a.collect {|x| x + "!" }   #=> ["a!", "b!", "c!", "d!"]
>         a                          #=> ["a", "b", "c", "d"]

I know what it does, but still it dosnt work.
-- 
Posted via http://www.ruby-forum.com/.