From: Massimiliano Mirra Date: 2002-10-23T18:14:10+09:00 Subject: Re: Grouping by twos On Tue, Oct 22, 2002 at 05:34:47AM +0900, Martin DeMello wrote: > Neat. Getting positively verbose, But the method name is short and expressive. I like that. :-) Hm, from `eachn' I'd expect: a.eachn(2) do |x, y| ... end a.eachn(3) do |x, y, z| .. end I'd rewrite `b = a.eachn(2)' in: b = a.collectn(2) {|a, b| [a, b]} For which an optional blockless form would make sense: b = a.collectn(2) Massimiliano