lib/active_support/benchmarkable.rb in activesupport-3.2.3 vs lib/active_support/benchmarkable.rb in activesupport-3.2.4.rc1
- old
+ new
@@ -33,10 +33,10 @@
if logger
options.assert_valid_keys(:level, :silence)
options[:level] ||= :info
result = nil
- ms = Benchmark.ms { result = options[:silence] ? logger.silence { yield } : yield }
+ ms = Benchmark.ms { result = options[:silence] ? silence { yield } : yield }
logger.send(options[:level], '%s (%.1fms)' % [ message, ms ])
result
else
yield
end