Sha256: 59d6caca0c09777e21bbda6b24c36ee60ec877df87255da490ceaee9547835a8
Contents?: true
Size: 345 Bytes
Versions: 23
Compression:
Stored size: 345 Bytes
Contents
describe "Array#rassoc" do it "returns the first contained array whose second element it == object" do ary = [[1, "a", 0.5], [2, "b"], [3, "b"], [4, "c"], [], [5], [6, "d"]] ary.rassoc("a").should == [1, "a", 0.5] ary.rassoc("b").should == [2, "b"] ary.rassoc("d").should == [6, "d"] ary.rassoc("z").should == nil end end
Version data entries
23 entries across 23 versions & 1 rubygems