aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-12-27 04:39:22 -0800
committerSantiago Pastorino <santiago@wyeworks.com>2011-12-27 04:39:22 -0800
commit01cde1da6c7a59a38e7a7aa949a3615b890d7414 (patch)
tree44ab6695e96a7aff801f08a483dedd63dc343b83
parent25452753a3c9ca539856778f4e583ba53508ce94 (diff)
parentaf404acf9fbcfb4ec4e6c49b0bfdd59561eb6ce6 (diff)
downloadrails-01cde1da6c7a59a38e7a7aa949a3615b890d7414.tar.gz
rails-01cde1da6c7a59a38e7a7aa949a3615b890d7414.tar.bz2
rails-01cde1da6c7a59a38e7a7aa949a3615b890d7414.zip
Merge pull request #4198 from castlerock/remove_GC_checks_for_ruby19
remove conditions for GC::Profiler in ruby19
-rw-r--r--activesupport/lib/active_support/testing/performance/ruby/yarv.rb14
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