in order to simplify ...
(0...textlist.length).select {|i| textlist[i] == "Orange"}[1]

David Springer wrote:
> (0..textlist.length-1).select {|i| textlist[i] == "Orange"}[1]

-- 
Posted via http://www.ruby-forum.com/.