ruby/ruby — pull request #616 by yyyc514 (2014-05-22 19:45:25+00:00)
Title: net/protocol.rb: fix SMTP dot stuffing

* fix SMTP dot-stuffing for messages not ending with a new-line

When a message body ends with just a "." and no new-line Ruby does not dot-stuff correctly. The remaining butter (after the last new-line) also needs to be dot-stuffed properly to avoid SMTP errors.

This includes a patch as well as passing test.

Reference:
* https://bugs.ruby-lang.org/issues/9627
* https://github.com/mikel/mail/pull/683