提交 cb74cfc9 编写于 作者: G Gonçalo Silva 提交者: wycats

check if the data method is defined (meaning it's correctly patched)

上级 901452d0
......@@ -331,8 +331,8 @@ def measure
class Memory < Base
Mode = RubyProf::MEMORY if RubyProf.const_defined?(:MEMORY)
# Ruby 1.9 + GC profiler patch
if defined?(GC::Profiler)
# Ruby 1.9 + extented GC profiler patch
if defined?(GC::Profiler) and GC::Profiler.respond_to?(:data)
def measure
GC.enable
GC.start
......@@ -380,8 +380,8 @@ def format(measurement)
class Objects < Base
Mode = RubyProf::ALLOCATIONS if RubyProf.const_defined?(:ALLOCATIONS)
# Ruby 1.9 + GC profiler patch
if defined?(GC::Profiler)
# Ruby 1.9 + extented GC profiler patch
if defined?(GC::Profiler) and GC::Profiler.respond_to?(:data)
def measure
GC.enable
GC.start
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册