Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge [5757] from trunk.

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-pre-release@5758 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit c7e2b0342409ec3e4bebe2887f723db48e47dc5a 1 parent 6ccbef5
@jeremy jeremy authored
View
2  actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*1.13.0 RC2*
+* Silence log_error deprecation warnings from inspecting deprecated instance variables. [Nate Wiger]
+
* Only cache GET requests with a 200 OK response. #6514, #6743 [RSL, anamba]
* Correctly report which filter halted the chain. #6699 [Martin Emde]
View
18 actionpack/lib/action_controller/rescue.rb
@@ -34,14 +34,16 @@ def rescue_action(exception)
# Overwrite to implement custom logging of errors. By default logs as fatal.
def log_error(exception) #:doc:
- if ActionView::TemplateError === exception
- logger.fatal(exception.to_s)
- else
- logger.fatal(
- "\n\n#{exception.class} (#{exception.message}):\n " +
- clean_backtrace(exception).join("\n ") +
- "\n\n"
- )
+ ActiveSupport::Deprecation.silence do
+ if ActionView::TemplateError === exception
+ logger.fatal(exception.to_s)
+ else
+ logger.fatal(
+ "\n\n#{exception.class} (#{exception.message}):\n " +
+ clean_backtrace(exception).join("\n ") +
+ "\n\n"
+ )
+ end
end
end
View
8 actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
@@ -45,7 +45,13 @@ def test_deprecated_render_parameters
assert_equal "Living in a nested world", @response.body
end
- def test_assertion_failed_error_doesnt_spout_deprecation_warnings
+ def test_log_error_silences_deprecation_warnings
+ get :raises_name_error
+ rescue => e
+ assert_not_deprecated { @controller.send :log_error, e }
+ end
+
+ def test_assertion_failed_error_silences_deprecation_warnings
get :raises_name_error
rescue => e
error = Test::Unit::Error.new('testing ur doodz', e)
Please sign in to comment.
Something went wrong with that request. Please try again.