From 2443b651011efc4c2597cf6e1d0e5aad50809b40 Mon Sep 17 00:00:00 2001 From: Vishnu Atrai Date: Tue, 27 Dec 2011 00:00:22 +0530 Subject: GC::Profiler available in ruby19 --- .../lib/active_support/testing/performance/ruby/yarv.rb | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/testing/performance/ruby/yarv.rb b/activesupport/lib/active_support/testing/performance/ruby/yarv.rb index 7873262331..a86b15781a 100644 --- a/activesupport/lib/active_support/testing/performance/ruby/yarv.rb +++ b/activesupport/lib/active_support/testing/performance/ruby/yarv.rb @@ -4,15 +4,12 @@ module ActiveSupport module Metrics class Base protected - # Ruby 1.9 with GC::Profiler - if defined?(GC::Profiler) - def with_gc_stats - GC::Profiler.enable - GC.start - yield - ensure - GC::Profiler.disable - end + def with_gc_stats + GC::Profiler.enable + GC.start + yield + ensure + GC::Profiler.disable end end -- cgit v1.2.3