Skip to content

Commit

Permalink
GcTime incorrectly checks GC.respond_to?(:total_time), it should chec…
Browse files Browse the repository at this point in the history
…k GC::Profiler.respond_to?(:total_time)

[#6435 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
  • Loading branch information
Joel Nimety authored and spastorino committed Feb 15, 2011
1 parent 09ccdc3 commit ef57334
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/testing/performance.rb
Expand Up @@ -401,7 +401,7 @@ class GcTime < Base
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
Expand Down

0 comments on commit ef57334

Please sign in to comment.