[前][次][番号順一覧][スレッド一覧]

ruby-changes:30943

From: akr <ko1@a...>
Date: Mon, 23 Sep 2013 21:52:55 +0900 (JST)
Subject: [ruby-changes:30943] akr:r43022 (trunk): [DOC]

akr	2013-09-23 21:52:49 +0900 (Mon, 23 Sep 2013)

  New Revision: 43022

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43022

  Log:
    [DOC]

  Modified files:
    trunk/io.c
Index: io.c
===================================================================
--- io.c	(revision 43021)
+++ io.c	(revision 43022)
@@ -8565,14 +8565,17 @@ rb_io_advise(int argc, VALUE *argv, VALU https://github.com/ruby/ruby/blob/trunk/io.c#L8565
  *  <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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]