Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove redundant variable

  • Loading branch information...
commit ba9537c275d5434aff505cdc5d435009715dcc0e 1 parent 33164c8
@Houdini Houdini authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  activesupport/lib/active_support/core_ext/hash/deep_dup.rb
View
3  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 ba9537c

Please sign in to comment.
Something went wrong with that request. Please try again.