With just this single patch reverted, the test case passes:
$ sudo patch -R -p2 < /home/ubuntu/0017-Reduce-memory-allocation-when-writing-to-SSLSocket.patch patching file openssl/buffering.rb
ubuntu@ruby25-sru-1835968-bionic:~$ ./testcase-ruby-ssl.rb 1 2 3 4 5 6 6.16.2Message sent via localhost; From ubuntu@localhost; To: ubuntu@localhost 6.37 You have new mail in /var/mail/ubuntu
With just this single patch reverted, the test case passes:
$ sudo patch -R -p2 < /home/ubuntu/ 0017-Reduce- memory- allocation- when-writing- to-SSLSocket. patch buffering. rb
patching file openssl/
ubuntu@ ruby25- sru-1835968- bionic: ~$ ./testcase- ruby-ssl. rb
1
2
3
4
5
6
6.16.2Message sent via localhost; From ubuntu@localhost; To: ubuntu@localhost
6.37
You have new mail in /var/mail/ubuntu