提交 af404acf 编写于 作者: V Vishnu Atrai

remove conditions for GC::Profiler in ruby19

上级 3e4d0dae
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册