Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Enumerators are a recent and significant addition to Ruby. Unlike some of the changes between Ruby 1.8 and 1.9, enumerators alter the Ruby programming landscape dramatically. In version 1.8.6, you could use them if you required the necessary library (require 'enumerator'); in 1.9, they’re present when you start up Ruby.
Enumerators are closely related to iterators, but they aren’t the same thing. An iterator is a method that yields one or more values to a code block. An enumerator is an object, not a method.