End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Enumerator#+
e + enum → enumerator
enumerator.c
View on GitHub ↗
static VALUE
enumerator_plus(VALUE obj, VALUE eobj)
{
VALUE enums = rb_ary_new_from_args(2, obj, eobj);
return enum_chain_initialize(enum_chain_allocate(rb_cEnumChain), enums);
}
Returns an enumerator object generated from this enumerator and a given enumerable.
Example
e = (1..3).each + [4, 5] e.to_a #=> [1, 2, 3, 4, 5]