lib/action_view/template/handlers/erb.rb in actionview-4.2.0.beta4 vs lib/action_view/template/handlers/erb.rb in actionview-4.2.0.rc1
- old
+ new
@@ -33,10 +33,10 @@
else
super
end
end
- BLOCK_EXPR = /\s+(do|\{)(\s*\|[^|]*\|)?\s*\Z/
+ BLOCK_EXPR = /\s*((\s+|\))do|\{)(\s*\|[^|]*\|)?\s*\Z/
def add_expr_literal(src, code)
flush_newline_if_pending(src)
if code =~ BLOCK_EXPR
src << '@output_buffer.append= ' << code