12 Aug 2009, 12:33
Generic-user-small

Alvyn Liang (1 post)

Hi

I looked into Internet and searched for this entry. Nothing is found.

I think it might be a wrong method you placed here.

M:\>ruby
a = [“a”,”v”]
a.find_index(“a”)
^D
-:2: undefined method `find_index’ for [“a”, “v”]:Array (NoMethodError)

Regards

16 Oct 2011, 21:52
Djb_picture_pragsmall

Donald J. Bailey (2 posts)

In Ruby 1.9, try
a.index “a”

  You must be logged in to comment