Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Enumerator::Product#each

obj.each { |...| ... } → obj
obj.each → enumerator

Iterates over the elements of the first enumerable by calling the “each_entry” 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. Otherwise, returns self.

See also .new #inspect #rewind also in 4.1 · 4.0 · 3.4 · 3.3