fix syntax for compatibility

This commit is contained in:
Charlie Smurthwaite
2019-07-17 14:46:33 +01:00
parent 34e5085c37
commit 634d3af59d
+5 -3
View File
@@ -328,9 +328,11 @@ module Postal
mail = Mail.new(self.raw_headers)
mail.header.fields.each_with_object({}) do |field, hash|
hash[field.name.downcase] ||= []
hash[field.name.downcase] << field.decoded
rescue Mail::Field::IncompleteParseError
# Never mind, move on to the next header
begin
hash[field.name.downcase] << field.decoded
rescue Mail::Field::IncompleteParseError
# Never mind, move on to the next header
end
end
end
end