Last Modified
2016-08-02 17:58:23 -0500


generator.rb: convert an internal iterator to an external one

Copyright © 2001,2003 Akinori MUSHA <>

All rights reserved. You can redistribute and/or modify it under the same terms as Ruby.


This library provides the Generator class, which converts an internal iterator (i.e. an Enumerable object) to an external iterator. In that form, you can roll many iterators independently.

The SyncEnumerator class, which is implemented using Generator, makes it easy to roll many Enumerable objects synchronously.

See the respective classes for examples of usage.

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit

blog comments powered by Disqus