1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Slice new buffer from beginning of old buffer to skip encoding special case

This commit is contained in:
Jeremy Kemper 2010-06-28 02:06:03 -07:00
parent 2c4f8aae5c
commit b3318bd937

View file

@ -178,9 +178,7 @@ module ActionView
def flush_output_buffer #:nodoc: def flush_output_buffer #:nodoc:
if output_buffer && !output_buffer.empty? if output_buffer && !output_buffer.empty?
response.body_parts << output_buffer response.body_parts << output_buffer
new = '' self.output_buffer = output_buffer[0,0]
new.force_encoding(output_buffer.encoding) if new.respond_to?(:force_encoding)
self.output_buffer = new
nil nil
end end
end end