diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb index 2617763175fcd3c74de45cb1fb1c895988c04314..cd5f4fc62ad9ad9f268f9cd75119e75a5595d65b 100644 --- a/activesupport/lib/active_support/testing/performance.rb +++ b/activesupport/lib/active_support/testing/performance.rb @@ -331,8 +331,8 @@ def measure class Memory < Base Mode = RubyProf::MEMORY if RubyProf.const_defined?(:MEMORY) - # Ruby 1.9 + GC profiler patch - if defined?(GC::Profiler) + # Ruby 1.9 + extented GC profiler patch + if defined?(GC::Profiler) and GC::Profiler.respond_to?(:data) def measure GC.enable GC.start @@ -380,8 +380,8 @@ def format(measurement) class Objects < Base Mode = RubyProf::ALLOCATIONS if RubyProf.const_defined?(:ALLOCATIONS) - # Ruby 1.9 + GC profiler patch - if defined?(GC::Profiler) + # Ruby 1.9 + extented GC profiler patch + if defined?(GC::Profiler) and GC::Profiler.respond_to?(:data) def measure GC.enable GC.start