rehash Rebuilds the hash based on the current hash values for each key. : rehash « Hash « Ruby






rehash Rebuilds the hash based on the current hash values for each key.


a = [ "a", "b" ]
c = [ "c", "d" ]
h = { a => 100, c => 300 }
h[a]  
a[0] = "z"
h[a]  
h.rehash
h[a]  

 








Related examples in the same category