From: James Edward Gray II Date: 2005-10-19T08:03:12+09:00 Subject: Re: Unit testing an each function On Oct 18, 2005, at 5:41 PM, Kevin Ballard wrote: > Hrm, I just discovered that Enumerable::Enumerator already exists > (require 'enumerator'), but I can't find docs on it. ruby-doc.org > gives > me a 404 on the enumerator page I believe James Britt said he had a copy of the docs but couldn't see the value in putting them up: http://groups.google.com/group/comp.lang.ruby/msg/7502f37a8a2fbf46 I filed a complaint, maybe you should add one too. :( > Any pointers? I discussed enumerator in this Ruby Quiz summary: http://www.rubyquiz.com/quiz50.html Then daz was nice enough to point me to the docs: http://groups.google.com/group/comp.lang.ruby/msg/46abfe771a1b0033 For what it's worth, I don't believe enumerator is what you built here. The library is used to switch any given iterator to each(): >> require "enumerator" => true >> str = "Some data..." => "Some data..." >> enum = str.enum_for(:each_byte) => # >> enum.map { |byte| byte.chr } => ["S", "o", "m", "e", " ", "d", "a", "t", "a", ".", ".", "."] Hope that helps. James Edward Gray II