On 10/18/06, dblack / wobblini.net <dblack / wobblini.net> wrote:

> I think so, but I think also my comment was misunderstood as "no
> method, of any name, should ever return an enumerator." :-)  The part
> I'm not comfortable with is, indeed, the method names.  each_* not
> taking a block strikes me as odd; I'm not convinced the "each" naming
> would ever have been used in the language if not for blocks, and I
> don't think it retrofits very well.  lines sounds like a collection.

Well, the idea of each* returning an enumerator if a block is not
given is new in 1.9 and I rather like it.
http://talklikeaduck.denhaven2.com/articles/2006/10/15/enumeration-improvement-in-ruby-1-9


On the other hand, I too tend to think that lines (without a block)
really should return an array of lines, and chars and bytes should
follow suit.

-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/