diff options
author | Matthew Draper <matthew@trebex.net> | 2016-11-25 15:57:50 +1030 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-25 15:57:50 +1030 |
commit | f243e7f0d0b2cef350127fd518532fedb65f0bd0 (patch) | |
tree | 66ff7818162b9e6b9b2b905251ac85fb7c33cd41 /activesupport/lib/active_support | |
parent | 96a2c96ec3616737d2a8eeced57198206ceb9b14 (diff) | |
parent | 308e84e982b940983b4b3d5b41b0b3ac11fbae40 (diff) | |
download | rails-f243e7f0d0b2cef350127fd518532fedb65f0bd0.tar.gz rails-f243e7f0d0b2cef350127fd518532fedb65f0bd0.tar.bz2 rails-f243e7f0d0b2cef350127fd518532fedb65f0bd0.zip |
Merge pull request #26874 from tgxworld/fix_broadcast_logger
`Broadcast#silence` breaks custom loggers that do not include `Logg…
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/logger.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/logger.rb b/activesupport/lib/active_support/logger.rb index 3ba6461b57..ea09d7d2df 100644 --- a/activesupport/lib/active_support/logger.rb +++ b/activesupport/lib/active_support/logger.rb @@ -59,14 +59,14 @@ module ActiveSupport define_method(:silence) do |level = Logger::ERROR, &block| if logger.respond_to?(:silence) logger.silence(level) do - if respond_to?(:silence) + if defined?(super) super(level, &block) else block.call(self) end end else - if respond_to?(:silence) + if defined?(super) super(level, &block) else block.call(self) |