On Sun, Jul 17, 2011 at 5:03 PM, jake kaiden <jakekaiden / yahoo.com> 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...
>
> =A0thanks 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 =3D=3D "out"
}

This is more efficient also since #index has to search the Array from
the beginning.

Kind regards

robert

--=20
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/