kernel/common/array.rb
# Searches through contained Arrays within the Array,
# comparing obj with the second element of each using
# elem == obj. Returns the first matching Array, nil
# on failure. See also Array#assoc.
Searches through contained Arrays within the Array,
comparing obj with the second element of each using
elem == obj. Returns the first matching Array, nil
on failure. See also Array#assoc.
Searches through contained Arrays within the Array comparing obj with the second element of each using elem == obj . Returns the first matching Array nil on failure . See also Array#assoc .
def rassoc(obj)
    each do |elem|
      if elem.kind_of? Array and elem.at(1) == obj
        return elem
      end
    end
    nil
  end
def rassoc ( obj ) each do | elem | if elem . kind_of? Array and elem . at ( 1 ) == obj return elem end end nil end
Searches through contained Arrays within the Array,
comparing obj with the second element of each using
elem == obj.
Searches through contained Arrays within the Array comparing obj with the second element of each using elem == obj .
obj
<not_specific>