diff options
Diffstat (limited to 'activesupport/lib/active_support/benchmarkable.rb')
-rw-r--r-- | activesupport/lib/active_support/benchmarkable.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/activesupport/lib/active_support/benchmarkable.rb b/activesupport/lib/active_support/benchmarkable.rb index 21c0296269..e303eaa5ce 100644 --- a/activesupport/lib/active_support/benchmarkable.rb +++ b/activesupport/lib/active_support/benchmarkable.rb @@ -31,13 +31,8 @@ module ActiveSupport # <% end %> def benchmark(message = "Benchmarking", options = {}) if logger - if options.is_a?(Symbol) - ActiveSupport::Deprecation.warn("use benchmark('#{message}', :level => :#{options}) instead", caller) - options = { :level => options, :silence => false } - else - options.assert_valid_keys(:level, :silence) - options[:level] ||= :info - end + options.assert_valid_keys(:level, :silence) + options[:level] ||= :info result = nil ms = Benchmark.ms { result = options[:silence] ? logger.silence { yield } : yield } |