Skip to content

Commit

Permalink
use AS::SafeBuffer#clone_empty for flushing the output_buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda authored and tenderlove committed Feb 21, 2012
1 parent 71b95bd commit dcf0964
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/helpers/capture_helper.rb
Expand Up @@ -215,7 +215,7 @@ def with_output_buffer(buf = nil) #:nodoc:
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
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 nil
end end
end end
Expand Down

0 comments on commit dcf0964

Please sign in to comment.