From 23be2c613490a06170ae50a72889957b006d36a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Silva?= Date: Thu, 24 Mar 2011 23:38:17 +0000 Subject: check if RubyProf's WALL_TIME and PROCESS_TIME are available before using them (similarly to other constants) --- activesupport/lib/active_support/testing/performance.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb index 8c91a061fb..42b58c4f25 100644 --- a/activesupport/lib/active_support/testing/performance.rb +++ b/activesupport/lib/active_support/testing/performance.rb @@ -305,7 +305,7 @@ begin end class ProcessTime < Time - Mode = RubyProf::PROCESS_TIME + Mode = RubyProf::PROCESS_TIME if RubyProf.const_defined?(:PROCESS_TIME) def measure RubyProf.measure_process_time @@ -313,7 +313,7 @@ begin end class WallTime < Time - Mode = RubyProf::WALL_TIME + Mode = RubyProf::WALL_TIME if RubyProf.const_defined?(:WALL_TIME) def measure RubyProf.measure_wall_time -- cgit v1.2.3