diff options
author | Xavier Noria <fxn@hashref.com> | 2010-03-15 18:29:21 +0100 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-15 11:26:51 -0700 |
commit | a594a22267bfd3346e00923742c4aa7edad0cef7 (patch) | |
tree | c4c1932bd2380fac528329ec0416fc483c08b492 /actionpack/lib/action_view/helpers | |
parent | c937da9e2fc14f74fb11d1ce605479c033ca29ee (diff) | |
download | rails-a594a22267bfd3346e00923742c4aa7edad0cef7.tar.gz rails-a594a22267bfd3346e00923742c4aa7edad0cef7.tar.bz2 rails-a594a22267bfd3346e00923742c4aa7edad0cef7.zip |
with_output_buffer cannot assume there's an output_buffer
[#4182 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-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 75fc2fddeb..03c7ba5a87 100644 --- a/actionpack/lib/action_view/helpers/capture_helper.rb +++ b/actionpack/lib/action_view/helpers/capture_helper.rb @@ -140,7 +140,7 @@ module ActionView def with_output_buffer(buf = nil) #:nodoc: unless buf buf = ActionView::OutputBuffer.new - buf.force_encoding(output_buffer.encoding) if buf.respond_to?(:force_encoding) + buf.force_encoding(output_buffer.encoding) if output_buffer && buf.respond_to?(:force_encoding) end self.output_buffer, old_buffer = buf, output_buffer yield |