aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing
diff options
context:
space:
mode:
authorGonçalo Silva <goncalossilva@gmail.com>2010-06-12 12:03:59 +0100
committerwycats <wycats@gmail.com>2010-06-17 19:18:53 -0700
commit0cef199c8efcba64b7e7acac036f32adfe293970 (patch)
tree8f2078edc897b9456b99e04a40108630871b8b09 /activesupport/lib/active_support/testing
parentc8019cd04a180c663dc15e2686a62bba545f8cd9 (diff)
downloadrails-0cef199c8efcba64b7e7acac036f32adfe293970.tar.gz
rails-0cef199c8efcba64b7e7acac036f32adfe293970.tar.bz2
rails-0cef199c8efcba64b7e7acac036f32adfe293970.zip
check if the profiler patch is applied, otherwise GC::Profiler doesn't have the 'data' method
Diffstat (limited to 'activesupport/lib/active_support/testing')
-rw-r--r--activesupport/lib/active_support/testing/performance.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb
index 472b15bfe0..836dce2005 100644
--- a/activesupport/lib/active_support/testing/performance.rb
+++ b/activesupport/lib/active_support/testing/performance.rb
@@ -261,7 +261,7 @@ begin
protected
# Ruby 1.9 + extented GC profiler patch
- if defined?(GC::Profiler)
+ if defined?(GC::Profiler) and GC::Profiler.respond_to?(:data)
def with_gc_stats
GC.start
GC.disable