On Fri, Feb 26, 2010 at 7:13 AM, David Springer <dnspringer / gmail.com> wrote:
> after some inspiration from Luc I was able to come up with this:
>
> textlist = ["Apple", "Orange", "Lemon", "Grape", "Orange",
>
> (0..textlist.length-1).select {|i| textlist[i] == "Orange"}[1]
>

Same thing only different :)

p textlist.fill{|x| x if textlist[x] == "Orange"}.compact[1]


Harry