2 ms·
> Enumerator are documented as soon as 1.9.1[1] in 2009[2] And Generator is present in 1.8 (though I can't determine how early in the 1.8 series). Same basic f
by dragonwriter 4y ago
> Enumerator are documented as soon as 1.9.1[1] in 2009[2]
And Generator is present in 1.8 (though I can't determine how early in the 1.8 series). Same basic function, slightly different API (and Generator used Continuations under the hood, while Enumerator uses Fibers, which improved performance and, in theory, implementability in alternative Rubies which didn't all support Continuation, which was one motivation for moving Continuation out of the core language in 1.9.)