Skip to content
instance method

Enumerable#chain

[Elem2] (*::_Each[Elem2] enumerables) -> ::Enumerator::Chain[Elem | Elem2]
e.chain(*enums) → enumerator

Returns an enumerator object generated from this enumerator and given enumerables.

Example
e = (1..3).chain([4, 5])
e.to_a #=> [1, 2, 3, 4, 5]
See also #any? #chunk #all? #chunk_while also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0