fix Hash#replace
Merge pull request #709 from kostya/hash_replace

fix Hash#replace