diff options
-rw-r--r-- | actionpack/lib/action_view/helpers/number_helper.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/testing/performance.rb | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index dfc26acfad..62455b97f9 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -254,7 +254,7 @@ module ActionView parts = number.to_s.to_str.split('.') parts[0].gsub!(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{options[:delimiter]}") - safe_join(parts, options[:separator]) + parts.join(options[:separator]).html_safe end # Formats a +number+ with the specified level of diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb index 5048c4a0d0..ec6986654e 100644 --- a/activesupport/lib/active_support/testing/performance.rb +++ b/activesupport/lib/active_support/testing/performance.rb @@ -126,7 +126,7 @@ module ActiveSupport def record; end end - class Benchmarker < Performer + class Benchmarker < Performer def initialize(*args) super @supported = @metric.respond_to?('measure') @@ -196,7 +196,6 @@ module ActiveSupport class Base include ActionView::Helpers::NumberHelper - include ActionView::Helpers::OutputSafetyHelper attr_reader :total @@ -208,7 +207,7 @@ module ActiveSupport @name ||= self.class.name.demodulize.underscore end - def benchmark + def benchmark with_gc_stats do before = measure yield |