1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Make MockLogger work with blocks.

This commit is contained in:
Rafael Mendonça França 2012-05-17 11:55:04 -03:00
parent 66d0be64b8
commit a8f568e1ec

View file

@ -61,7 +61,7 @@ module ActiveSupport
@logged = Hash.new { |h,k| h[k] = [] }
end
def method_missing(level, message)
def method_missing(level, message = nil)
if block_given?
@logged[level] << yield
else