Notes posted by danielglh
RSS feed
1 thank
This method does not correctly dup arrays
Watch out because this method does not correctly dup arrays values.
The bug can be reproduced with the following code:
hash = { 'a' => [1,2,3,4] } dup = hash.deep_dup dup['a'].object_id == hash['a'].object_id # should return true
Rails 4 version does not have this issue because it is completely different implementation.