diff options
author | Steve Klabnik <steve@steveklabnik.com> | 2012-09-18 16:53:36 +0300 |
---|---|---|
committer | Steve Klabnik <steve@steveklabnik.com> | 2012-09-18 16:53:36 +0300 |
commit | 88d578a11fc2755a9714234be99f5752dcc1b5aa (patch) | |
tree | d1f85e441820ed69035ee067d482e3636e7c7e97 /railties/lib | |
parent | 56071b37d078f524c62e09d232cc656f68588785 (diff) | |
download | rails-88d578a11fc2755a9714234be99f5752dcc1b5aa.tar.gz rails-88d578a11fc2755a9714234be99f5752dcc1b5aa.tar.bz2 rails-88d578a11fc2755a9714234be99f5752dcc1b5aa.zip |
Remove 'assigned but unused variable' warning
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/deprecation.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails/deprecation.rb b/railties/lib/rails/deprecation.rb index c5811b2629..89f54069e9 100644 --- a/railties/lib/rails/deprecation.rb +++ b/railties/lib/rails/deprecation.rb @@ -3,7 +3,8 @@ require 'active_support/deprecation/proxy_wrappers' module Rails class DeprecatedConstant < ActiveSupport::Deprecation::DeprecatedConstantProxy def self.deprecate(old, current) - constant = new(old, current) + # double assignment is used to avoid "assigned but unused variable" warning + constant = constant = new(old, current) eval "::#{old} = constant" end |