collect()
public
Returns a new array with the results of running block once for
every element in enum.
(1..4).collect {|i| i*i }
(1..4).collect { "cat" }
static VALUE
enum_collect(VALUE obj)
{
VALUE ary;
RETURN_ENUMERATOR(obj, 0, 0);
ary = rb_ary_new();
rb_block_call(obj, id_each, 0, 0, collect_i, ary);
return ary;
}