next() public

Returns the next object in the enumerator, and move the internal position forward. When the position reached at the end, internal position is rewound then StopIteration is raised.

Note that enumeration sequence by next method does not affect other non-external enumeration methods, unless underlying iteration methods itself has side-effect, e.g. IO#each_line.

Show source
Register or log in to add new notes.