kernel/common/array.rb
# Returns the index of the first element in the Array
# for which elem == obj is true or nil.
Returns the index of the first element in the Array
for which elem == obj is true or nil.
Returns the index of the first element in the Array for which elem == obj is true or nil .
def index(obj)
    i = 0
    while i < @total do
      return i if at(i) == obj
      i += 1
    end
    nil
  end
def index ( obj ) i = 0 while i < @total do return i if at ( i ) == obj i += 1 end nil end
Returns the index of the first element in the Array
for which elem == obj is true or nil.
Returns the index of the first element in the Array for which elem == obj is true or nil .
obj
<not_specific>