1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

GcTime incorrectly checks GC.respond_to?(:total_time), it should check GC::Profiler.respond_to?(:total_time)

[#6435 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
Joel Nimety 2011-02-15 14:21:33 -05:00 committed by Santiago Pastorino
parent 09ccdc3737
commit ef57334210

View file

@ -401,7 +401,7 @@ begin
Mode = RubyProf::GC_TIME if RubyProf.const_defined?(:GC_TIME) Mode = RubyProf::GC_TIME if RubyProf.const_defined?(:GC_TIME)
# Ruby 1.9 with GC::Profiler # Ruby 1.9 with GC::Profiler
if GC.respond_to?(:total_time) if defined?(GC::Profiler) && GC::Profiler.respond_to?(:total_time)
def measure def measure
GC::Profiler.total_time GC::Profiler.total_time
end end