find_all()
public
Returns an array containing all elements of enum for which
block is not false (see also Enumerable#reject).
(1..10).find_all {|i| i % 3 == 0 }
Show source
static VALUE
enum_find_all(VALUE obj)
{
VALUE ary;
RETURN_ENUMERATOR(obj, 0, 0);
ary = rb_ary_new();
rb_block_call(obj, id_each, 0, 0, find_all_i, ary);
return ary;
}