提交 39c3bda2 编写于 作者: R Rafael Mendonça França

Merge pull request #7680 from steveklabnik/master

Remove 'assigned but unused variable' warning
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册