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

ruby-changes:45618

From: nobu <ko1@a...>
Date: Thu, 23 Feb 2017 10:54:17 +0900 (JST)
Subject: [ruby-changes:45618] nobu:r57691 (trunk): socket.rb: [DOC] fix nonblock methods

nobu	2017-02-23 10:54:13 +0900 (Thu, 23 Feb 2017)

  New Revision: 57691

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57691

  Log:
    socket.rb: [DOC] fix nonblock methods
    
    * ext/socket/lib/socket.rb (BasicSocket#recv_nonblock): fix
      exception class and symbol.
    
    * ext/socket/lib/socket.rb (BasicSocket#recvmsg_nonblock): ditto.
    
    * ext/socket/lib/socket.rb (Socket#recvfrom_nonblock): fix the
      method name.
    
    * ext/socket/lib/socket.rb (UDPSocket#recvfrom_nonblock): both.

  Modified files:
    trunk/ext/socket/lib/socket.rb
Index: ext/socket/lib/socket.rb
===================================================================
--- ext/socket/lib/socket.rb	(revision 57690)
+++ ext/socket/lib/socket.rb	(revision 57691)
@@ -363,8 +363,8 @@ class BasicSocket < IO https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L363
   # So IO::WaitReadable can be used to rescue the exceptions for retrying recv_nonblock.
   #
   # By specifying `exception: false`, the options hash allows you to indicate
-  # that recv_nonblock should not raise an IO::WaitWritable exception, but
-  # return the symbol :wait_writable instead. At EOF, it will return nil instead
+  # that recv_nonblock should not raise an IO::WaitReadable exception, but
+  # return the symbol :wait_readable instead. At EOF, it will return nil instead
   # of raising EOFError.
   #
   # === See
@@ -438,8 +438,8 @@ class BasicSocket < IO https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L438
   # and it doesn't retry the system call.
   #
   # By specifying `exception: false`, the _opts_ hash allows you to indicate
-  # that recvmsg_nonblock should not raise an IO::WaitWritable exception, but
-  # return the symbol :wait_writable instead. At EOF, it will return nil instead
+  # that recvmsg_nonblock should not raise an IO::WaitReadable exception, but
+  # return the symbol :wait_readable instead. At EOF, it will return nil instead
   # of raising EOFError.
   def recvmsg_nonblock(dlen = nil, flags = 0, clen = nil,
                        scm_rights: false, exception: true)
@@ -516,7 +516,7 @@ class Socket < BasicSocket https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L516
   # recvfrom_nonblock.
   #
   # By specifying `exception: false`, the options hash allows you to indicate
-  # that accept_nonblock should not raise an IO::WaitReadable exception, but
+  # that recvfrom_nonblock should not raise an IO::WaitReadable exception, but
   # return the symbol :wait_readable instead. At EOF, it will return nil instead
   # of raising EOFError.
   #
@@ -1253,8 +1253,8 @@ class UDPSocket < IPSocket https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L1253
   # So IO::WaitReadable can be used to rescue the exceptions for retrying recvfrom_nonblock.
   #
   # By specifying `exception: false`, the options hash allows you to indicate
-  # that recvmsg_nonblock should not raise an IO::WaitWritable exception, but
-  # return the symbol :wait_writable instead. At EOF, it will return nil instead
+  # that recvfrom_nonblock should not raise an IO::WaitReadable exception, but
+  # return the symbol :wait_readable instead. At EOF, it will return nil instead
   # of raising EOFError.
   #
   # === See

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

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