Permalink
Browse files

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
  • Loading branch information...
josh committed Mar 30, 2008
1 parent 65b4702 commit bf3c2172389679e937a88a7a8379c7112740628b
Showing with 3 additions and 3 deletions.
  1. +3 −3 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
+end

0 comments on commit bf3c217

Please sign in to comment.