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:
parent
09ccdc3737
commit
ef57334210
1 changed files with 1 additions and 1 deletions
|
@ -401,7 +401,7 @@ begin
|
|||
Mode = RubyProf::GC_TIME if RubyProf.const_defined?(:GC_TIME)
|
||||
|
||||
# Ruby 1.9 with GC::Profiler
|
||||
if GC.respond_to?(:total_time)
|
||||
if defined?(GC::Profiler) && GC::Profiler.respond_to?(:total_time)
|
||||
def measure
|
||||
GC::Profiler.total_time
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue