Permalink
Browse files

Merge pull request #5623 from Houdini/master

Remove redundant variable from core_ext/hash/deep_dup.rb
  • Loading branch information...
2 parents a3e5b7b + ba9537c commit 647ccdcad465e225e65c3fb233e59f2e3ceaceaa @josevalim josevalim committed Mar 28, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 activesupport/lib/active_support/core_ext/hash/deep_dup.rb
@@ -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

0 comments on commit 647ccdc

Please sign in to comment.