--- !ruby/object:RDoc::RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: Searches through the hash comparing <em>obj</em> with the key using <tt>==</tt>. Returns the key-value pair (two elements array) or <tt>nil</tt> if no match is found. See <tt>Array#assoc</tt>.
- !ruby/struct:RDoc::Markup::Flow::VERB 
  :body: "   h = {&quot;colors&quot;  =&gt; [&quot;red&quot;, &quot;blue&quot;, &quot;green&quot;],\n        &quot;letters&quot; =&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]}\n   h.assoc(&quot;letters&quot;)  #=&gt; [&quot;letters&quot;, [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]]\n   h.assoc(&quot;foo&quot;)      #=&gt; nil\n"
full_name: Hash#assoc
is_singleton: false
name: assoc
params: |
  hash.assoc(obj)   ->  an_array  or  nil

visibility: public
