vim: fix Mail 2.8.0 warning

Passing an unparsed header field to Mail::Field.new is deprecated and will be removed in Mail 2.8.0. Use Mail::Field.parse instead.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras 2021-04-18 17:48:39 -05:00 committed by David Bremner
parent 00487fa901
commit 8af4cd160a

View file

@ -666,7 +666,7 @@ ruby << EOF
date = Time.at(e.newest_date).strftime(date_fmt) date = Time.at(e.newest_date).strftime(date_fmt)
subject = e.messages.first['subject'] subject = e.messages.first['subject']
if $mail_installed if $mail_installed
subject = Mail::Field.new("Subject: " + subject).to_s subject = Mail::Field.parse("Subject: " + subject).to_s
else else
subject = subject.force_encoding('utf-8') subject = subject.force_encoding('utf-8')
end end