From: Patrick Gundlach Date: 2005-12-08T21:07:38+09:00 Subject: Re: increasing counter whithin loop? Hi, >> > able to use it. I'd probably have to create each_with_prev_and_next. > > It's allready there: [...] > require 'enumerator' > ([nil] + a + [nil]).each_cons(3) do |prv, this, nxt| .... That's interesting, thanks. Patrick