Merge pull request #5623 from Houdini/master

Remove redundant variable from core_ext/hash/deep_dup.rb
This commit is contained in:
José Valim 2012-03-28 01:18:09 -07:00
commit 647ccdcad4
1 changed files with 1 additions and 2 deletions

View File

@ -3,8 +3,7 @@ class Hash
def deep_dup
duplicate = self.dup
duplicate.each_pair do |k,v|
tv = duplicate[k]
duplicate[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? tv.deep_dup : v
duplicate[k] = v.is_a?(Hash) ? v.deep_dup : v
end
duplicate
end