Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #7680 from steveklabnik/master

Remove 'assigned but unused variable' warning
  • Loading branch information...
commit 39c3bda28684514487217beb0b6099890a6867d2 2 parents 9f2d1a1 + 88d578a
@rafaelfranca rafaelfranca authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  railties/lib/rails/deprecation.rb
View
3  railties/lib/rails/deprecation.rb
@@ -3,7 +3,8 @@
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
Please sign in to comment.
Something went wrong with that request. Please try again.