1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/net
normal cbedbaf9d9 lib/net/protocol.rb: account read_bytes before caller sees it
Users may modify the chunk yielded to them in Net::HTTPResponse#read_body.
This will allow users to reduce memory usage by calling
String#clear on the buffer once they're done using it.

* lib/net/protocol.rb (read): increment read_bytes earlier
  (read_all): ditto
* test/net/http/test_httpresponse.rb (test_read_body_block_mod): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-22 07:36:00 +00:00
..
http Define classes for r58800 2017-05-19 16:19:46 +00:00
ftp.rb Suppress warnings. 2016-11-29 08:44:21 +00:00
http.rb Net::HTTP#start now pass :ENV to p_addr by default [Bug #13351] 2017-05-19 15:13:42 +00:00
https.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
imap.rb net/imap: separate @continuation_request_exception from @exception 2017-05-22 06:13:11 +00:00
pop.rb lib/net/pop.rb: Specify frozen_string_literal: true. 2017-01-10 12:32:56 +00:00
protocol.rb lib/net/protocol.rb: account read_bytes before caller sees it 2017-05-22 07:36:00 +00:00
smtp.rb lib/net/smtp.rb: Specify frozen_string_literal: true. 2017-01-12 12:17:33 +00:00