diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-24 23:38:17 +0000 |
---|---|---|
committer | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-24 23:38:17 +0000 |
commit | 23be2c613490a06170ae50a72889957b006d36a7 (patch) | |
tree | 6442b1634e006a0cf1e381a443a7cbd78a6ff371 /activesupport/lib/active_support/testing/performance.rb | |
parent | 9887f238871bb2dd73de6ce8855615bcc5d8d079 (diff) | |
download | rails-23be2c613490a06170ae50a72889957b006d36a7.tar.gz rails-23be2c613490a06170ae50a72889957b006d36a7.tar.bz2 rails-23be2c613490a06170ae50a72889957b006d36a7.zip |
check if RubyProf's WALL_TIME and PROCESS_TIME are available before using them (similarly to other constants)
Diffstat (limited to 'activesupport/lib/active_support/testing/performance.rb')
-rw-r--r-- | activesupport/lib/active_support/testing/performance.rb | 4 |
1 files 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 |