From e76891314126b10d5cf57aaf776dfa2a26553ec3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 20 Feb 2016 18:41:33 +0100 Subject: Make benchmark('something', silence: true) actually work --- activesupport/lib/active_support/benchmarkable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/benchmarkable.rb b/activesupport/lib/active_support/benchmarkable.rb index 805b7a714f..3988b147ac 100644 --- a/activesupport/lib/active_support/benchmarkable.rb +++ b/activesupport/lib/active_support/benchmarkable.rb @@ -38,7 +38,7 @@ module ActiveSupport options[:level] ||= :info result = nil - ms = Benchmark.ms { result = options[:silence] ? silence { yield } : yield } + ms = Benchmark.ms { result = options[:silence] ? logger.silence { yield } : yield } logger.send(options[:level], '%s (%.1fms)' % [ message, ms ]) result else -- cgit v1.2.3