Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Enumerator::Chain#each

() { (Elem) -> void } -> void
obj.each(*args) { |...| ... } → obj
obj.each(*args) → enumerator

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.

See also .new #inspect #rewind also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0