Hi,

An Enumerator is the right choice.

However, in your case you don't even need to explicitly create an 
Enumerator, because this will be done automatically when omitting the 
block for the "each" method:

@foo = (1..10).each

Most "each" methods work like that.

-- 
Posted via http://www.ruby-forum.com/.