Permalink
Browse files

remove conditions for GC::Profiler in ruby19

  • Loading branch information...
1 parent 3e4d0da commit af404acf9fbcfb4ec4e6c49b0bfdd59561eb6ce6 @vishnuatrai vishnuatrai committed Dec 26, 2011
Showing with 4 additions and 10 deletions.
  1. +4 −10 activesupport/lib/active_support/testing/performance/ruby/yarv.rb
@@ -32,20 +32,14 @@ def measure
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

0 comments on commit af404ac

Please sign in to comment.