Your IP : 3.15.142.42


Current Path : /opt/alt/ruby18/share/ri/1.8/system/Hash/
Upload File :
Current File : //opt/alt/ruby18/share/ri/1.8/system/Hash/rehash-i.yaml

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

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Rebuilds the hash based on the current hash values for each key. If values of key objects have changed since they were inserted, this method will reindex <em>hsh</em>. If <tt>Hash#rehash</tt> is called while an iterator is traversing the hash, an <tt>IndexError</tt> will be raised in the iterator.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot; ]\n   c = [ &quot;c&quot;, &quot;d&quot; ]\n   h = { a =&gt; 100, c =&gt; 300 }\n   h[a]       #=&gt; 100\n   a[0] = &quot;z&quot;\n   h[a]       #=&gt; nil\n   h.rehash   #=&gt; {[&quot;z&quot;, &quot;b&quot;]=&gt;100, [&quot;c&quot;, &quot;d&quot;]=&gt;300}\n   h[a]       #=&gt; 100\n"
full_name: Hash#rehash
is_singleton: false
name: rehash
params: |
  hsh.rehash -> hsh

visibility: public

?>