diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-03-17 09:18:09 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-03-17 09:18:09 -0700 |
commit | b365354e593da172c55770aed22c8211dbc18b08 (patch) | |
tree | c24d3fc8b0dc363993a1dba83746984a808ea268 /actionpack | |
parent | 28cb11045b63147a376655149c38c9c10486085c (diff) | |
parent | c23f3aa7c03feece8232245d2e135a7375571f5c (diff) | |
download | rails-b365354e593da172c55770aed22c8211dbc18b08.tar.gz rails-b365354e593da172c55770aed22c8211dbc18b08.tar.bz2 rails-b365354e593da172c55770aed22c8211dbc18b08.zip |
Merge pull request #9754 from macksmind/fix_actionpack_warnings
Fix rake test warnings in actionpack
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/template.rb | 3 | ||||
-rw-r--r-- | actionpack/test/controller/test_case_test.rb | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index 720890eeb9..946db1df79 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -324,7 +324,8 @@ module ActionView 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: diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb index 9c6d02a62d..38b9794b4d 100644 --- a/actionpack/test/controller/test_case_test.rb +++ b/actionpack/test/controller/test_case_test.rb @@ -58,7 +58,7 @@ class TestCaseTest < ActionController::TestCase end def test_headers - render text: JSON.dump(request.headers.env) + render text: request.headers.env.to_json end def test_html_output |