…e handling. Move temp message_id assignment into the ensure block.
Fix message comparison: take 2
Comparing a Message w/o message_id set to another object would set it's Message-ID to a temporary value. Ditto for the object compared to.
In the case where it acted to quote the input string, quote_phrase shouldn't modify the encoding of the input string to be ASCII-8BIT, but should leave the encoding as it found it.
Before this, Mail::Fields just defaulted to .to_s, which was both confusing to read and potentially side-effecty.
fix header's charset getting reset to nil unintentionally
Before this change the code assumed you could concatenate two Base64 strings, which is not true. This fix relies on non-standard behaviour of our parser: RFC 2047 says that encoded-words MUST be separated by at least a space, but we happily parse two unseparated encoded-words. Fixes: #560 Fixes: #561 Broken-since: 2.5.4 (cb81621)