lib/active_support/benchmarkable.rb in activesupport-5.0.7.2 vs lib/active_support/benchmarkable.rb in activesupport-5.1.0.beta1
- old
+ new
@@ -1,7 +1,7 @@
-require 'active_support/core_ext/benchmark'
-require 'active_support/core_ext/hash/keys'
+require "active_support/core_ext/benchmark"
+require "active_support/core_ext/hash/keys"
module ActiveSupport
module Benchmarkable
# Allows you to measure the execution time of a block in a template and
# records the result to the log. Wrap this block around expensive operations
@@ -37,10 +37,10 @@
options.assert_valid_keys(:level, :silence)
options[:level] ||= :info
result = nil
ms = Benchmark.ms { result = options[:silence] ? logger.silence { yield } : yield }
- logger.send(options[:level], '%s (%.1fms)' % [ message, ms ])
+ logger.send(options[:level], "%s (%.1fms)" % [ message, ms ])
result
else
yield
end
end