From: Kevin Ballard Date: 2005-10-19T13:31:57+09:00 Subject: Re: Unit testing an each function James Edward Gray II wrote: > Hmm, isn't what you wrote an automatic Generator class? (See > standard library.) Not really. Generator basically gives you external iterators which you can access element by element, so you can do things like iterate over 2 enumerables in step. What I wrote is basically just a convenience for applying a method call to all the elements in a single enumerable. After all, %w{a long list of words}.collect.length is the same thing as %w{a long list of words}.collect { |item| item.length} but easier to read. > Yeah, I don't have a problem with it. I'm probably not the kind of > guy who would using it, but if you and others would, go for it. I > love sharing. :) Ok, then I'll probably package it up tomorrow.