On 10/20/06, Nikolai Weibull <now / bitwi.se> wrote: > On 10/19/06, dblack / wobblini.net <dblack / wobblini.net> wrote: > > > On Thu, 19 Oct 2006, Nikolai Weibull wrote: > > > > Anyway, I'd love to be able to write > > > > > > IO.read(file).lines.each{ |line| puts line if line =~ pattern }. > > > If lines were a collection of lines, you could do exactly that. And, > > just to say it again, I'm not saying that there should be no methods > > that return Enumerators, just that "things" sounds (to my Ruby-trained > > mind :-) like a collection/array of things. > > But it /is/ a collection of lines. And it works just fine without an > intermediate array. What I'm saying is that you may have to retrain > your mind to get it to understand that a collection can be represented > by other things than a plain-ol' array. > > I realize that you know what I'm saying above, but I figured I'd drive > my point home in a concise manner as well. Anyway, I'll leave this discussion alone now, I think. Everyone knows by now that I like the names, I like how the methods work, and so on. nikolai