enable_stats added back in since Benchmarker doesn't start RubyProf

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
Gonçalo Silva
2010-06-18 06:11:05 +01:00
committed by Jeremy Kemper
parent 0cef199c8e
commit 113b0ec03c

View File

@@ -272,7 +272,15 @@ begin
GC.enable
end
# Ruby 1.8 + ruby-prof wrapper
# Ruby 1.8 + ruby-prof wrapper (enable/disable stats for Benchmarker)
elsif GC.respond_to?(:enable_stats)
def with_gc_stats
GC.enable_stats
yield
ensure
GC.disable_stats
end
else
def with_gc_stats
yield