Skip to content
This repository
Browse code

Slice new buffer from beginning of old buffer to skip encoding specia…

…l case
  • Loading branch information...
commit b3318bd937a238ad2def93cb3bfa5b572f80a8a8 1 parent 2c4f8aa
Jeremy Kemper authored June 28, 2010
4  actionpack/lib/action_view/helpers/capture_helper.rb
@@ -178,9 +178,7 @@ def with_output_buffer(buf = nil) #:nodoc:
178 178
       def flush_output_buffer #:nodoc:
179 179
         if output_buffer && !output_buffer.empty?
180 180
           response.body_parts << output_buffer
181  
-          new = ''
182  
-          new.force_encoding(output_buffer.encoding) if new.respond_to?(:force_encoding)
183  
-          self.output_buffer = new
  181
+          self.output_buffer = output_buffer[0,0]
184 182
           nil
185 183
         end
186 184
       end

0 notes on commit b3318bd

Please sign in to comment.
Something went wrong with that request. Please try again.