From: Robert Klemme Date: 2011-07-18T20:05:48+09:00 Subject: Re: Array#each vs. Array#each_index iteration On Sun, Jul 17, 2011 at 5:03 PM, jake kaiden wrote: > i was indeed missing something obvious - thanks for pointing it out! > somehow i overlooked that Array#index was always going to return the > first occurrence even if it was within an iteration... > >  thanks again - the scorecard is coming along - go sox! Have you been referred to #each_with_index already? array.each{|entry, index| p index if entry == "out" } This is more efficient also since #index has to search the Array from the beginning. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/