Sha256: 995ff8c78c7d083b86c7947c64baa2522abec54947912b46bbc58c738e454a28
Contents?: true
Size: 257 Bytes
Versions: 6
Compression:
Stored size: 257 Bytes
Contents
# TODO Remove Array#index when future Ruby has it. class Array alias :index_of :index # Allows block usage with index. def index(obj=nil,&blk) return index_of(obj) unless block_given? i=0; i+=1 until yield(self[i]) return i end end
Version data entries
6 entries across 6 versions & 1 rubygems