aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/benchmarkable.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-05-25 14:55:04 -0700
committerJosé Valim <jose.valim@gmail.com>2011-05-25 14:55:04 -0700
commit9b6791870bbe67f5c93cad0a676148b7cc83e697 (patch)
tree6504cf5ab233e716173a416012f9e908764c9e9e /activesupport/lib/active_support/benchmarkable.rb
parent7fd0a6de849606b5449c55e41151d556d14ef75d (diff)
parent9cafc28874a681082f9f7e1e445db91f195a25ae (diff)
downloadrails-9b6791870bbe67f5c93cad0a676148b7cc83e697.tar.gz
rails-9b6791870bbe67f5c93cad0a676148b7cc83e697.tar.bz2
rails-9b6791870bbe67f5c93cad0a676148b7cc83e697.zip
Merge pull request #1312 from joshk/remove_active_support_deprecations
Removed deprecated methods and related tests from ActiveSupport
Diffstat (limited to 'activesupport/lib/active_support/benchmarkable.rb')
-rw-r--r--activesupport/lib/active_support/benchmarkable.rb9
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 }