Skip to content

Commit ad13136

Browse files
committed
⚠️ literal string will be frozen in the future
1 parent 8188576 commit ad13136

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/message.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ def from_mail(mail, list, list_seq)
7777
file = StringIO.new(part.decoded)
7878
attachments.attach(io: file, filename: part.filename || 'noname', content_type: part.content_type)
7979
when /^text\/plain/, /text\/enriched;/, 'message/rfc822', nil
80-
(self.body ||= '') << Kconv.toutf8(part.body.raw_source)
80+
(self.body ||= ''.dup) << Kconv.toutf8(part.body.raw_source)
8181
when /^text\/html/
82-
(self.html_body ||= '') << Kconv.toutf8(part.body.raw_source)
82+
(self.html_body ||= ''.dup) << Kconv.toutf8(part.body.raw_source)
8383
else
8484
puts "Unknown content_type: #{part.content_type}"
8585
end

0 commit comments

Comments
 (0)