git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-09-23 12:52:49 +00:00
Родитель 645257261e
Коммит e6fe59e96e
1 изменённых файлов: 11 добавлений и 8 удалений

19
io.c
Просмотреть файл

@ -8565,14 +8565,17 @@ rb_io_advise(int argc, VALUE *argv, VALUE io)
* <code>write_nonblock</code> and <code>IO.select</code> as follows:
* IO::WaitReadable should also be rescued for SSL renegotiation in <code>OpenSSL::SSL::SSLSocket</code>.
*
* begin
* result = io_like.write_nonblock(string)
* rescue IO::WaitReadable
* IO.select([io_like])
* retry
* rescue IO::WaitWritable
* IO.select(nil, [io_like])
* retry
* while 0 < string.bytesize
* begin
* written = io_like.write_nonblock(string)
* rescue IO::WaitReadable
* IO.select([io_like])
* retry
* rescue IO::WaitWritable
* IO.select(nil, [io_like])
* retry
* end
* string = string.byteslice(written..-1)
* end
*
* === Parameters