diff options
author | José Valim <jose.valim@gmail.com> | 2012-05-17 08:52:40 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-05-17 08:52:40 +0200 |
commit | 313f292e27bfb093a59b8aee4d606f2c63391c7c (patch) | |
tree | 48e19dea03f3a6ef726d0ea2752c1ed6ec466a36 /activesupport/lib | |
parent | 6057a1d9d2522e27e8c9f2f44aab8cd2815f24da (diff) | |
download | rails-313f292e27bfb093a59b8aee4d606f2c63391c7c.tar.gz rails-313f292e27bfb093a59b8aee4d606f2c63391c7c.tar.bz2 rails-313f292e27bfb093a59b8aee4d606f2c63391c7c.zip |
Ensure blocks given to subscriber are properly yield
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/log_subscriber/test_helper.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/log_subscriber/test_helper.rb b/activesupport/lib/active_support/log_subscriber/test_helper.rb index 6e1502989b..9d01dc85c0 100644 --- a/activesupport/lib/active_support/log_subscriber/test_helper.rb +++ b/activesupport/lib/active_support/log_subscriber/test_helper.rb @@ -61,11 +61,12 @@ module ActiveSupport @logged = Hash.new { |h,k| h[k] = [] } end - def debug - end - def method_missing(level, message) - @logged[level] << message + if block_given? + @logged[level] << yield + else + @logged[level] << message + end end def logged(level) |