diff options
Diffstat (limited to 'activesupport/lib/active_support/benchmarkable.rb')
-rw-r--r-- | activesupport/lib/active_support/benchmarkable.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/benchmarkable.rb b/activesupport/lib/active_support/benchmarkable.rb index 3d8bb13c49..4c7a694c52 100644 --- a/activesupport/lib/active_support/benchmarkable.rb +++ b/activesupport/lib/active_support/benchmarkable.rb @@ -48,7 +48,8 @@ module ActiveSupport # Silence the logger during the execution of the block. def silence - ActiveSupport::Deprecation.warn "ActiveSupport::Benchmarkable#silence is deprecated. It will be removed from Rails 4.1." + message = "ActiveSupport::Benchmarkable#silence is deprecated. It will be removed from Rails 4.1." + ActiveSupport::Deprecation.warn(message, caller) old_logger_level, logger.level = logger.level, ::Logger::ERROR if logger yield ensure |