Method: Enumerable#select

Defined in:
enum.c

#find_all {|obj| ... } ⇒ Array #select {|obj| ... } ⇒ Array

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 }   #=> [3, 6, 9]

Overloads:

  • #find_all {|obj| ... } ⇒ Array

    Yields:

    • (obj)

    Returns:

  • #select {|obj| ... } ⇒ Array

    Yields:

    • (obj)

    Returns:



351
352
353
# File 'enum.c', line 351

static VALUE
enum_find_all(obj)
VALUE obj;