diff options
Diffstat (limited to 'actionview/lib/action_view/template/handlers/erb/erubi.rb')
-rw-r--r-- | actionview/lib/action_view/template/handlers/erb/erubi.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionview/lib/action_view/template/handlers/erb/erubi.rb b/actionview/lib/action_view/template/handlers/erb/erubi.rb index db75f028ed..d379d7ec12 100644 --- a/actionview/lib/action_view/template/handlers/erb/erubi.rb +++ b/actionview/lib/action_view/template/handlers/erb/erubi.rb @@ -13,7 +13,7 @@ module ActionView # Dup properties so that we don't modify argument properties = Hash[properties] - properties[:preamble] = "@output_buffer = output_buffer || ActionView::OutputBuffer.new;" + properties[:preamble] = "@output_buffer = output_buffer;" properties[:postamble] = "@output_buffer.to_s" properties[:bufvar] = "@output_buffer" properties[:escapefunc] = "" @@ -23,6 +23,8 @@ module ActionView def evaluate(action_view_erb_handler_context) pr = eval("proc { #{@src} }", binding, @filename || "(erubi)") + # Double assignment to eliminate -w warnings + output_buffer = output_buffer = ActionView::OutputBuffer.new action_view_erb_handler_context.instance_eval(&pr) end |