From: Malte Milatz Date: 2005-12-06T00:52:33+09:00 Subject: Re: increasing counter whithin loop? ts: > try it, with > > array = [ :a, :b, :c, :d, :e , :b] Huh. Right. So it becomes array.each_with_index do |x, i| next if array[i-1] == :b unless i == 0 print x, ' ' end Nasty. Malte