diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-12-26 14:03:56 -0800 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-12-26 14:03:56 -0800 |
commit | 3e4d0daedfdf1e041fcf13e896a273556e426b64 (patch) | |
tree | 34ab9bd28182990bf9e9e4d927a5eeb16f0bf9a2 /activesupport | |
parent | 28b008bae3c572ded0a76cea8766c1e1eeab5e71 (diff) | |
parent | 2443b651011efc4c2597cf6e1d0e5aad50809b40 (diff) | |
download | rails-3e4d0daedfdf1e041fcf13e896a273556e426b64.tar.gz rails-3e4d0daedfdf1e041fcf13e896a273556e426b64.tar.bz2 rails-3e4d0daedfdf1e041fcf13e896a273556e426b64.zip |
Merge pull request #4195 from castlerock/remove_19_condition_for_GC_Profiler
GC::Profiler available in ruby19
Diffstat (limited to 'activesupport')
-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 |