lib/active_support/testing/performance.rb in activesupport-3.0.4 vs lib/active_support/testing/performance.rb in activesupport-3.0.5.rc1
- old
+ new
@@ -399,10 +399,10 @@
class GcTime < Base
Mode = RubyProf::GC_TIME if RubyProf.const_defined?(:GC_TIME)
# Ruby 1.9 with GC::Profiler
- if GC.respond_to?(:total_time)
+ if defined?(GC::Profiler) && GC::Profiler.respond_to?(:total_time)
def measure
GC::Profiler.total_time
end
# Ruby 1.8 + ruby-prof wrapper