diff options
author | Vishnu Atrai <me@vishnuatrai.com> | 2011-12-27 00:00:22 +0530 |
---|---|---|
committer | Vishnu Atrai <me@vishnuatrai.com> | 2011-12-27 00:00:22 +0530 |
commit | 2443b651011efc4c2597cf6e1d0e5aad50809b40 (patch) | |
tree | 34f3b53f47197d1432d59dbd3eb9ba67e1f8388a /activesupport/lib/active_support/testing/performance/ruby | |
parent | bec7cf2d1f600ba141b42de917a7c51f3b565308 (diff) | |
download | rails-2443b651011efc4c2597cf6e1d0e5aad50809b40.tar.gz rails-2443b651011efc4c2597cf6e1d0e5aad50809b40.tar.bz2 rails-2443b651011efc4c2597cf6e1d0e5aad50809b40.zip |
GC::Profiler available in ruby19
Diffstat (limited to 'activesupport/lib/active_support/testing/performance/ruby')
-rw-r--r-- | activesupport/lib/active_support/testing/performance/ruby/yarv.rb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/testing/performance/ruby/yarv.rb b/activesupport/lib/active_support/testing/performance/ruby/yarv.rb index 7873262331..a86b15781a 100644 --- a/activesupport/lib/active_support/testing/performance/ruby/yarv.rb +++ b/activesupport/lib/active_support/testing/performance/ruby/yarv.rb @@ -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 |