From bf3c2172389679e937a88a7a8379c7112740628b Mon Sep 17 00:00:00 2001 From: Josh Peek Date: Sun, 30 Mar 2008 03:04:41 +0000 Subject: 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 --- activesupport/lib/active_support/core_ext/benchmark.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activesupport/lib') 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 -- cgit v1.2.3