diff options
Diffstat (limited to 'activesupport/lib/active_support/log_subscriber')
-rw-r--r-- | activesupport/lib/active_support/log_subscriber/test_helper.rb | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/log_subscriber/test_helper.rb b/activesupport/lib/active_support/log_subscriber/test_helper.rb index 588ed67c81..3f19ef5009 100644 --- a/activesupport/lib/active_support/log_subscriber/test_helper.rb +++ b/activesupport/lib/active_support/log_subscriber/test_helper.rb @@ -1,6 +1,8 @@ -require 'active_support/log_subscriber' -require 'active_support/logger' -require 'active_support/notifications' +# frozen_string_literal: true + +require "active_support/log_subscriber" +require "active_support/logger" +require "active_support/notifications" module ActiveSupport class LogSubscriber @@ -58,15 +60,15 @@ module ActiveSupport def initialize(level = DEBUG) @flush_count = 0 @level = level - @logged = Hash.new { |h,k| h[k] = [] } + @logged = Hash.new { |h, k| h[k] = [] } end def method_missing(level, message = nil) - if block_given? - @logged[level] << yield - else - @logged[level] << message - end + if block_given? + @logged[level] << yield + else + @logged[level] << message + end end def logged(level) |