mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
check if the profiler patch is applied, otherwise GC::Profiler doesn't have the 'data' method
This commit is contained in:
@@ -261,7 +261,7 @@ begin
|
||||
|
||||
protected
|
||||
# Ruby 1.9 + extented GC profiler patch
|
||||
if defined?(GC::Profiler)
|
||||
if defined?(GC::Profiler) and GC::Profiler.respond_to?(:data)
|
||||
def with_gc_stats
|
||||
GC.start
|
||||
GC.disable
|
||||
|
||||
Reference in New Issue
Block a user