Permalink
Browse files

Merge pull request #4198 from castlerock/remove_GC_checks_for_ruby19

remove conditions for GC::Profiler in ruby19
  • Loading branch information...
2 parents 2545275 + af404ac commit 01cde1da6c7a59a38e7a7aa949a3615b890d7414 @spastorino spastorino committed Dec 27, 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 01cde1d

Please sign in to comment.