diff options
author | Vishnu Atrai <me@vishnuatrai.com> | 2011-12-27 00:07:30 +0530 |
---|---|---|
committer | Vishnu Atrai <me@vishnuatrai.com> | 2011-12-27 08:46:03 +0530 |
commit | af404acf9fbcfb4ec4e6c49b0bfdd59561eb6ce6 (patch) | |
tree | dcab80b6dc5bb282d866d964f803406e3ccef230 /activesupport | |
parent | 3e4d0daedfdf1e041fcf13e896a273556e426b64 (diff) | |
download | rails-af404acf9fbcfb4ec4e6c49b0bfdd59561eb6ce6.tar.gz rails-af404acf9fbcfb4ec4e6c49b0bfdd59561eb6ce6.tar.bz2 rails-af404acf9fbcfb4ec4e6c49b0bfdd59561eb6ce6.zip |
remove conditions for GC::Profiler in ruby19
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/testing/performance/ruby/yarv.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/testing/performance/ruby/yarv.rb b/activesupport/lib/active_support/testing/performance/ruby/yarv.rb index a86b15781a..c34d31bf10 100644 --- a/activesupport/lib/active_support/testing/performance/ruby/yarv.rb +++ b/activesupport/lib/active_support/testing/performance/ruby/yarv.rb @@ -32,20 +32,14 @@ module ActiveSupport end class GcRuns < Amount - # Ruby 1.9 - if GC.respond_to?(:count) - def measure - GC.count - end + def measure + GC.count end end class GcTime < Time - # Ruby 1.9 with GC::Profiler - if defined?(GC::Profiler) && GC::Profiler.respond_to?(:total_time) - def measure - GC::Profiler.total_time - end + def measure + GC::Profiler.total_time end end end |