Skip to content

Commit

Permalink
Merge pull request rails#5623 from Houdini/master
Browse files Browse the repository at this point in the history
Remove redundant variable from core_ext/hash/deep_dup.rb
  • Loading branch information
josevalim committed Mar 28, 2012
2 parents a3e5b7b + ba9537c commit 647ccdc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions activesupport/lib/active_support/core_ext/hash/deep_dup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 647ccdc

Please sign in to comment.