1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

PERF: Don't create unnecessary objects

This commit is contained in:
Santiago Pastorino 2010-10-03 14:58:18 -02:00
parent 10249d7b77
commit 4920312643

View file

@ -248,7 +248,7 @@ module ActionMailer
else else
ctype, *attrs = @content_type.split(/;\s*/) ctype, *attrs = @content_type.split(/;\s*/)
attrs = Hash[attrs.map { |attr| attr.split(/\=/, 2) }] attrs = Hash[attrs.map { |attr| attr.split(/\=/, 2) }]
[ctype, {"charset" => @charset}.merge(attrs)] [ctype, {"charset" => @charset}.merge!(attrs)]
end end
end end
end end