diff options
author | Mack Earnhardt <mack@agilereasoning.com> | 2013-03-16 23:24:27 -0400 |
---|---|---|
committer | Mack Earnhardt <mack@agilereasoning.com> | 2013-03-17 12:16:42 -0400 |
commit | c23f3aa7c03feece8232245d2e135a7375571f5c (patch) | |
tree | 8b011573dabe9c6b720bf562fd1c54a1be1446e2 | |
parent | f5ecb133335dbfcb2322e5ce91158cf91f730aea (diff) | |
download | rails-c23f3aa7c03feece8232245d2e135a7375571f5c.tar.gz rails-c23f3aa7c03feece8232245d2e135a7375571f5c.tar.bz2 rails-c23f3aa7c03feece8232245d2e135a7375571f5c.zip |
Fix rake test warnings in 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 |