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

Merge pull request #9754 from macksmind/fix_actionpack_warnings

Fix rake test warnings in actionpack
......@@ -324,7 +324,8 @@ def handle_render_error(view, e) #:nodoc:
end
def locals_code #:nodoc:
@locals.map { |key| "#{key} = local_assigns[:#{key}];" }.join
# Double assign to suppress the dreaded 'assigned but unused variable' warning
@locals.map { |key| "#{key} = #{key} = local_assigns[:#{key}];" }.join
end
def method_name #:nodoc:
......
......@@ -58,7 +58,7 @@ def test_protocol
end
def test_headers
render text: JSON.dump(request.headers.env)
render text: request.headers.env.to_json
end
def test_html_output
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册