diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2012-05-31 17:18:25 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2012-05-31 17:18:25 +0100 |
commit | 67b94799c27cc3214017627aede759c5c5a39189 (patch) | |
tree | e3baef5883b73940af5fc37abda32bedd0ad13e0 /activesupport/lib | |
parent | 5752b313ec63cf7015f165b28aac1d7938274c13 (diff) | |
download | rails-67b94799c27cc3214017627aede759c5c5a39189.tar.gz rails-67b94799c27cc3214017627aede759c5c5a39189.tar.bz2 rails-67b94799c27cc3214017627aede759c5c5a39189.zip |
Reduce warning messages when running Active Support tests
Eliminate the warnings generated by redefining methods and constants.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/testing/performance/ruby.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/testing/performance/ruby.rb b/activesupport/lib/active_support/testing/performance/ruby.rb index 1104fc0a03..12aef0d7fe 100644 --- a/activesupport/lib/active_support/testing/performance/ruby.rb +++ b/activesupport/lib/active_support/testing/performance/ruby.rb @@ -18,6 +18,7 @@ module ActiveSupport end).freeze protected + remove_method :run_gc def run_gc GC.start end @@ -28,6 +29,7 @@ module ActiveSupport @supported = @metric.measure_mode rescue false end + remove_method :run def run return unless @supported @@ -39,6 +41,7 @@ module ActiveSupport @total = @data.threads.sum(0) { |thread| thread.methods.max.total_time } end + remove_method :record def record return unless @supported @@ -78,6 +81,7 @@ module ActiveSupport self.class::Mode end + remove_method :profile def profile RubyProf.resume yield @@ -86,6 +90,7 @@ module ActiveSupport end protected + remove_method :with_gc_stats def with_gc_stats GC::Profiler.enable GC.start |