1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib
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
..
cgi
drb
forwardable
irb
matrix
net lib/net/protocol.rb: account read_bytes before caller sees it 2017-05-22 07:36:00 +00:00
optparse
racc
rdoc
rexml
rinda
rss
rubygems
shell
unicode_normalize
uri
webrick
yaml
abbrev.rb
base64.rb
benchmark.rb
cgi.rb
cmath.gemspec
cmath.rb
csv.gemspec
csv.rb Remove redundant square brackets 2017-05-21 01:01:10 +00:00
debug.rb
delegate.rb
drb.rb
e2mmap.rb
English.rb
erb.rb erb.rb: Skip creating regexp 2017-05-22 03:56:16 +00:00
fileutils.gemspec
fileutils.rb
find.rb
forwardable.rb
getoptlong.rb
ipaddr.rb
irb.rb
logger.rb
matrix.rb
mkmf.rb
monitor.rb
mutex_m.rb
observer.rb
open-uri.rb
open3.rb
optionparser.rb
optparse.rb
ostruct.rb
pp.rb
prettyprint.rb
prime.rb
profile.rb
profiler.rb
pstore.rb
rdoc.rb
resolv-replace.rb
resolv.rb
rss.rb
rubygems.rb
scanf.gemspec
scanf.rb
securerandom.rb
set.rb
shell.rb
shellwords.rb
singleton.rb
sync.rb
tempfile.rb
thwait.rb
time.rb
timeout.rb
tmpdir.rb
tracer.rb
tsort.rb
ubygems.rb
un.rb
uri.rb
weakref.rb
webrick.rb
yaml.rb