method

index

v1_8_6_287 - Show latest stable - Class: Array
index(p1)
public

Returns the index of the first object in self such that is == to obj. Returns nil if no match is found.

   a = [ "a", "b", "c" ]
   a.index("b")   #=> 1
   a.index("z")   #=> nil

1Note

This is an alias

Mange ยท Jul 8, 20091 thank

Please comment under the real method instead: find_index