simplify some TaggedLogging methods

This commit is contained in:
Sergey Nartimov 2012-01-18 05:02:04 +03:00
parent cead2dd1f4
commit ffb0c5185c
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ module ActiveSupport
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 @@ module ActiveSupport
def tags_text
tags = current_tags
if tags.any?
tags.collect { |tag| "[#{tag}]" }.join(" ") + " "
tags.collect { |tag| "[#{tag}] " }.join
end
end