From af404acf9fbcfb4ec4e6c49b0bfdd59561eb6ce6 Mon Sep 17 00:00:00 2001 From: Vishnu Atrai Date: Tue, 27 Dec 2011 00:07:30 +0530 Subject: remove conditions for GC::Profiler in ruby19 --- .../lib/active_support/testing/performance/ruby/yarv.rb | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'activesupport/lib/active_support/testing/performance/ruby') diff --git a/activesupport/lib/active_support/testing/performance/ruby/yarv.rb b/activesupport/lib/active_support/testing/performance/ruby/yarv.rb index a86b15781a..c34d31bf10 100644 --- a/activesupport/lib/active_support/testing/performance/ruby/yarv.rb +++ b/activesupport/lib/active_support/testing/performance/ruby/yarv.rb @@ -32,20 +32,14 @@ module ActiveSupport end class GcRuns < Amount - # Ruby 1.9 - if GC.respond_to?(:count) - def measure - GC.count - end + def measure + GC.count end end class GcTime < Time - # Ruby 1.9 with GC::Profiler - if defined?(GC::Profiler) && GC::Profiler.respond_to?(:total_time) - def measure - GC::Profiler.total_time - end + def measure + GC::Profiler.total_time end end end -- cgit v1.2.3