aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2016-02-20 18:41:33 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2016-02-20 18:41:33 +0100
commite76891314126b10d5cf57aaf776dfa2a26553ec3 (patch)
treeddbf63ad02f922f1ce97987f77b8a787ed694477 /activesupport/lib/active_support
parenteb65f04fb2d53c8bd89e48d0fce731eb1ac1a196 (diff)
downloadrails-e76891314126b10d5cf57aaf776dfa2a26553ec3.tar.gz
rails-e76891314126b10d5cf57aaf776dfa2a26553ec3.tar.bz2
rails-e76891314126b10d5cf57aaf776dfa2a26553ec3.zip
Make benchmark('something', silence: true) actually work
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/benchmarkable.rb2
1 files changed, 1 insertions, 1 deletions
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