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

use AS::SafeBuffer#clone_empty for flushing the output_buffer

This commit is contained in:
Akira Matsuda 2012-02-13 17:57:05 +09:00 committed by Aaron Patterson
parent 71b95bd954
commit dcf0964d64

View file

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