James Edward Gray II wrote: > I believe there has been talk in the past of having index() take a > block for matching. Meh... talk schmalk... class Array alias orig_index index def index(*args) return orig_index(*args) unless block_given? (0...length).each do |i| return i if yield self[i] end nil end end array = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] array.index 21 #=> 15 array.index {|n| n.nonzero? } #=> 15 Devin