mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't try to destoy the given string via method argument
Or it would raise if the argument was frozen.
And even with this change, it would still reduce String allocations together with 9276ea89d2
because `escape` should be `true` in most cases
This commit is contained in:
parent
9276ea89d2
commit
7d2400ab61
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ module ActionView
|
|||
if value.is_a?(Array)
|
||||
value = escape ? safe_join(value, " ".freeze) : value.join(" ".freeze)
|
||||
else
|
||||
value = escape ? ERB::Util.unwrapped_html_escape(value) : value.to_s
|
||||
value = escape ? ERB::Util.unwrapped_html_escape(value) : value.to_s.dup
|
||||
end
|
||||
value.gsub!('"'.freeze, '"'.freeze)
|
||||
%(#{key}="#{value}")
|
||||
|
|
Loading…
Reference in a new issue