1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/zlib
normal cc9b57a2b4 zlib (gzfile_write_raw): do not resize string after .write call
Apparently, a component of Rails implements a buffering .write
method which keeps the String buffer around and makes it unsafe
for us to clear it after calling .write.

This caused Rack::Deflater to give empty results when enabled.

Fortunately, per r61631 / a55abcc0ca,
this misguided optimization was only worth a small (0.5MB) savings
and we still benefit from the majority of the memory savings in
that change.

Thanks to zunda for the bug report.

[ruby-core:90133] [Bug #15356]

Fixes: r61631 (commit a55abcc0ca)
       ("zlib: reduce garbage on gzip writes (deflate)")

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-07 07:09:31 +00:00
..
.gitignore ignore external library sources [ci skip] 2018-01-26 03:13:33 +00:00
depend ruby tool/update-deps --fix 2017-03-22 06:00:18 +00:00
extconf.rb zlib for mingw 2017-03-03 09:27:27 +00:00
zlib.c zlib (gzfile_write_raw): do not resize string after .write call 2018-12-07 07:09:31 +00:00
zlib.gemspec zlib: fix Zlib::VERSION 2018-10-18 00:55:05 +00:00