mirror of https://github.com/rails/rails
Merge pull request #5623 from Houdini/master
Remove redundant variable from core_ext/hash/deep_dup.rb
This commit is contained in:
commit
647ccdcad4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue