mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #4195 from castlerock/remove_19_condition_for_GC_Profiler
GC::Profiler available in ruby19
This commit is contained in:
commit
3e4d0daedf
1 changed files with 6 additions and 9 deletions
|
@ -4,15 +4,12 @@ module ActiveSupport
|
|||
module Metrics
|
||||
class Base
|
||||
protected
|
||||
# Ruby 1.9 with GC::Profiler
|
||||
if defined?(GC::Profiler)
|
||||
def with_gc_stats
|
||||
GC::Profiler.enable
|
||||
GC.start
|
||||
yield
|
||||
ensure
|
||||
GC::Profiler.disable
|
||||
end
|
||||
def with_gc_stats
|
||||
GC::Profiler.enable
|
||||
GC.start
|
||||
yield
|
||||
ensure
|
||||
GC::Profiler.disable
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue