lib/async_partial/handlers/erubi.rb in async_partial-0.6.0 vs lib/async_partial/handlers/erubi.rb in async_partial-0.7.0
- old
+ new
@@ -8,10 +8,10 @@
def initialize(input, properties = {})
@newline_pending = 0
# Dup properties so that we don't modify argument
properties = Hash[properties]
- properties[:preamble] = "output_buffer = ActionView::OutputBuffer.new;"
+ properties[:preamble] = "output_buffer ||= ActionView::OutputBuffer.new;"
properties[:postamble] = "output_buffer.to_s"
properties[:bufvar] = "output_buffer"
properties[:escapefunc] = ""
# Call ::Erubi::Engine#initializer