# File lib/facets/core/array/index.rb, line 9 def index(obj=nil,&blk) return index_of(obj) unless block_given? i=0; i+=1 until yield(self[i]) return i end