File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
actionview/lib/action_view Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ def supports_streaming?
155
155
# This method is instrumented as "!render_template.action_view". Notice that
156
156
# we use a bang in this instrumentation because you don't want to
157
157
# consume this in production. This is only slow if it's being listened to.
158
- def render ( view , locals , buffer = nil , &block )
158
+ def render ( view , locals , buffer = ActionView :: OutputBuffer . new , &block )
159
159
instrument_render_template do
160
160
compile! ( view )
161
161
view . send ( method_name , locals , buffer , &block )
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def initialize(input, properties = {})
13
13
14
14
# Dup properties so that we don't modify argument
15
15
properties = Hash [ properties ]
16
- properties [ :preamble ] = "@output_buffer = output_buffer || ActionView::OutputBuffer.new ;"
16
+ properties [ :preamble ] = "@output_buffer = output_buffer;"
17
17
properties [ :postamble ] = "@output_buffer.to_s"
18
18
properties [ :bufvar ] = "@output_buffer"
19
19
properties [ :escapefunc ] = ""
@@ -23,6 +23,8 @@ def initialize(input, properties = {})
23
23
24
24
def evaluate ( action_view_erb_handler_context )
25
25
pr = eval ( "proc { #{ @src } }" , binding , @filename || "(erubi)" )
26
+ # Double assignment to eliminate -w warnings
27
+ output_buffer = output_buffer = ActionView ::OutputBuffer . new
26
28
action_view_erb_handler_context . instance_eval ( &pr )
27
29
end
28
30
You can’t perform that action at this time.
0 commit comments