diff options
author | Akira Matsuda <ronnie@dio.jp> | 2012-02-13 17:57:05 +0900 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-20 16:02:44 -0800 |
commit | dcf0964d64903605c6dc9d2e149ca0e45bd2aea2 (patch) | |
tree | 6996540fee0736268bc60b466082fea31c047777 /actionpack | |
parent | 71b95bd954edd8e8f09293044d49b34b9120279a (diff) | |
download | rails-dcf0964d64903605c6dc9d2e149ca0e45bd2aea2.tar.gz rails-dcf0964d64903605c6dc9d2e149ca0e45bd2aea2.tar.bz2 rails-dcf0964d64903605c6dc9d2e149ca0e45bd2aea2.zip |
use AS::SafeBuffer#clone_empty for flushing the output_buffer
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/capture_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/capture_helper.rb b/actionpack/lib/action_view/helpers/capture_helper.rb index 17bbfe2efd..278139cadb 100644 --- a/actionpack/lib/action_view/helpers/capture_helper.rb +++ b/actionpack/lib/action_view/helpers/capture_helper.rb @@ -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 |