mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
optimize string literals in erb templates
This commit is contained in:
parent
d5332de379
commit
4d648819c5
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ module ActionView
|
|||
src << "@output_buffer.safe_append='"
|
||||
src << "\n" * @newline_pending if @newline_pending > 0
|
||||
src << escape_text(text)
|
||||
src << "';"
|
||||
src << "'.freeze;"
|
||||
|
||||
@newline_pending = 0
|
||||
end
|
||||
|
@ -67,7 +67,7 @@ module ActionView
|
|||
|
||||
def flush_newline_if_pending(src)
|
||||
if @newline_pending > 0
|
||||
src << "@output_buffer.safe_append='#{"\n" * @newline_pending}';"
|
||||
src << "@output_buffer.safe_append='#{"\n" * @newline_pending}'.freeze;"
|
||||
@newline_pending = 0
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue