This method is only available on newer versions.
The first available version (v2_6_3) is shown here.
each(*args)
public
Iterates over the elements of the first enumerable by calling the
“each” method on it with the given arguments, then proceeds to the
following enumerables in sequence until all of the enumerables are
exhausted.
If no block is given, returns an enumerator.
static VALUE
enum_chain_each(int argc, VALUE *argv, VALUE obj)
{
VALUE enums, block;
struct enum_chain *objptr;
long i;
RETURN_SIZED_ENUMERATOR(obj, argc, argv, argc > 0 ? enum_chain_enum_no_size : enum_chain_enum_size);
objptr = enum_chain_ptr(obj);
enums = objptr->enums;
block = rb_block_proc();
for (i = 0; i < RARRAY_LEN(enums); i++) {
objptr->pos = i;
rb_block_call(RARRAY_AREF(enums, i), id_each, argc, argv, enum_chain_yield_block, block);
}
return obj;
}