check if the profiler patch is applied, otherwise GC::Profiler doesn't have the 'data' method

This commit is contained in:
Gonçalo Silva
2010-06-12 12:03:59 +01:00
committed by wycats
parent c8019cd04a
commit 0cef199c8e

View File

@@ -261,7 +261,7 @@ begin
protected
# Ruby 1.9 + extented GC profiler patch
if defined?(GC::Profiler)
if defined?(GC::Profiler) and GC::Profiler.respond_to?(:data)
def with_gc_stats
GC.start
GC.disable