diff options
author | Josh Peek <josh@joshpeek.com> | 2008-03-30 03:04:41 +0000 |
---|---|---|
committer | Josh Peek <josh@joshpeek.com> | 2008-03-30 03:04:41 +0000 |
commit | bf3c2172389679e937a88a7a8379c7112740628b (patch) | |
tree | cc82d81c82e4df88a35e7853346a4678aa251ea7 /activesupport | |
parent | 65b4702c4f410b0ff1443eccf48f578a495cb7bf (diff) | |
download | rails-bf3c2172389679e937a88a7a8379c7112740628b.tar.gz rails-bf3c2172389679e937a88a7a8379c7112740628b.tar.bz2 rails-bf3c2172389679e937a88a7a8379c7112740628b.zip |
Ruby 1.9 compat: Suppress Benchmark.realtime method redefined warning.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9142 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/benchmark.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/benchmark.rb b/activesupport/lib/active_support/core_ext/benchmark.rb index 98e61e646a..79ba165e3a 100644 --- a/activesupport/lib/active_support/core_ext/benchmark.rb +++ b/activesupport/lib/active_support/core_ext/benchmark.rb @@ -1,12 +1,12 @@ require 'benchmark' -module Benchmark +class << Benchmark remove_method :realtime + def realtime r0 = Time.now yield r1 = Time.now r1.to_f - r0.to_f end - module_function :realtime -end
\ No newline at end of file +end |