rails/rails — Issue #4159: TaggedLogging doesn't delegate properly (breaks Logger#silence method)
Author: dolzenko
Created: 2011-12-24 09:36:32+00:00
State: open

The latest RC added TaggedLogging which breaks the Logger#silence method which was used before to silence logger messages and is defined here https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/logger.rb#L43

(new Kernel#silence is delegated to instead). Illustration

rails new temp && cd temp && rails console
Rails.logger.silence {}
ArgumentError: wrong number of arguments (0 for 1)
from /home/evgeniy/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.0.rc1/lib/active_support/core_ext/kernel/reporting.rb:68:in `capture'
from (irb):1

Failing test

https://github.com/dolzenko/rails/commit/c28e4c

So what should we do? Should the TaggedLogging inherin from BasicObject? If so I'll be happy to provide a patch.