From b3318bd937a238ad2def93cb3bfa5b572f80a8a8 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 28 Jun 2010 02:06:03 -0700 Subject: Slice new buffer from beginning of old buffer to skip encoding special case --- actionpack/lib/action_view/helpers/capture_helper.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_view/helpers/capture_helper.rb b/actionpack/lib/action_view/helpers/capture_helper.rb index ea1bf14c96..f9105ca364 100644 --- a/actionpack/lib/action_view/helpers/capture_helper.rb +++ b/actionpack/lib/action_view/helpers/capture_helper.rb @@ -178,9 +178,7 @@ module ActionView def flush_output_buffer #:nodoc: if output_buffer && !output_buffer.empty? response.body_parts << output_buffer - new = '' - new.force_encoding(output_buffer.encoding) if new.respond_to?(:force_encoding) - self.output_buffer = new + self.output_buffer = output_buffer[0,0] nil end end -- cgit v1.2.3