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