diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2016-02-20 18:41:33 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2016-02-20 18:41:33 +0100 |
commit | e76891314126b10d5cf57aaf776dfa2a26553ec3 (patch) | |
tree | ddbf63ad02f922f1ce97987f77b8a787ed694477 /activesupport/lib/active_support | |
parent | eb65f04fb2d53c8bd89e48d0fce731eb1ac1a196 (diff) | |
download | rails-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.rb | 2 |
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 |