method

rassoc

v1_8_7_72 - Show latest stable - Class: Array
rassoc(p1)
public

Searches through the array whose elements are also arrays. Compares key with the second element of each contained array using ==. Returns the first contained array that matches. See also Array#assoc.

   a = [ [ 1, "one"], [2, "two"], [3, "three"], ["ii", "two"] ]
   a.rassoc("two")    #=> [2, "two"]
   a.rassoc("four")   #=> nil