From: 7stud -- Date: 2011-04-10T04:02:00+09:00 Subject: Re: Calling to_enum on a MatchData object Here's how you can use an enumerator to create an infinite array, from which you can print out finite chunks: e = Enumerator.new do |y| (0..9).cycle do |x| y << x end end p e.take(15) --output:-- [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4] -- Posted via http://www.ruby-forum.com/.