# File lib/backports/1.9.1/hash/assoc.rb, line 3 def assoc(key) val = fetch(key) do return find do |k, v| [k, v] if k == key end end [key, val] end