Permalink
Browse files

Merge pull request #4508 from lest/patch-1

Refactor TaggedLogging
  • Loading branch information...
2 parents 57aaaa6 + ffb0c51 commit 5065d17f706e2271837e759e25ba1cc291b916dc @josevalim josevalim committed Jan 18, 2012
@@ -1,8 +1,5 @@
-require 'thread'
-require 'active_support/core_ext/class/attribute_accessors'
require 'active_support/deprecation'
require 'active_support/logger'
-require 'fileutils'
module ActiveSupport
BufferedLogger = ActiveSupport::Deprecation::DeprecatedConstantProxy.new(
@@ -1,7 +1,5 @@
require 'active_support/concern'
require 'active_support/ordered_options'
-require 'active_support/core_ext/kernel/singleton_class'
-require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/array/extract_options'
module ActiveSupport
@@ -22,7 +22,7 @@ def tagged(*new_tags)
tags.concat new_tags
yield
ensure
- new_tags.size.times { tags.pop }
+ tags.pop(new_tags.size)
end
def add(severity, message = nil, progname = nil, &block)
@@ -51,7 +51,7 @@ def method_missing(method, *args)
def tags_text
tags = current_tags
if tags.any?
- tags.collect { |tag| "[#{tag}]" }.join(" ") + " "
+ tags.collect { |tag| "[#{tag}] " }.join
end
end

0 comments on commit 5065d17

Please sign in to comment.