Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

GcTime incorrectly checks GC.respond_to?(:total_time), it should chec…

…k GC::Profiler.respond_to?(:total_time)

[#6435 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
  • Loading branch information...
commit ef573342106369b07bb5c97a0db0b121d6d18621 1 parent 09ccdc3
@jnimety jnimety authored spastorino committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  activesupport/lib/active_support/testing/performance.rb
View
2  activesupport/lib/active_support/testing/performance.rb
@@ -401,7 +401,7 @@ class GcTime < Base
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
Please sign in to comment.
Something went wrong with that request. Please try again.