ruby-changes:45621
From: nobu <ko1@a...>
Date: Thu, 23 Feb 2017 11:40:23 +0900 (JST)
Subject: [ruby-changes:45621] nobu:r57694 (trunk): Revert r57690 except for read_nonblock
nobu 2017-02-23 11:40:17 +0900 (Thu, 23 Feb 2017) New Revision: 57694 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57694 Log: Revert r57690 except for read_nonblock https://github.com/ruby/ruby/pull/1527#issuecomment-281867551 Modified files: trunk/ext/openssl/lib/openssl/buffering.rb trunk/ext/openssl/ossl_ssl.c trunk/ext/socket/lib/socket.rb trunk/prelude.rb Index: ext/socket/lib/socket.rb =================================================================== --- ext/socket/lib/socket.rb (revision 57693) +++ ext/socket/lib/socket.rb (revision 57694) @@ -315,8 +315,7 @@ class BasicSocket < IO https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L315 # # By specifying a keyword argument _exception_ to +false+, you can indicate # that sendmsg_nonblock should not raise an IO::WaitWritable exception, but - # return the symbol +:wait_writable+ instead. At EOF, it will return +nil+ - # instead of raising EOFError. + # return the symbol +:wait_writable+ instead. def sendmsg_nonblock(mesg, flags = 0, dest_sockaddr = nil, *controls, exception: true) __sendmsg_nonblock(mesg, flags, dest_sockaddr, controls, exception) @@ -364,8 +363,7 @@ class BasicSocket < IO https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L363 # # By specifying a keyword argument _exception_ to +false+, you can indicate # 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. + # return the symbol +:wait_readable+ instead. # # === See # * Socket#recvfrom @@ -439,8 +437,7 @@ class BasicSocket < IO https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L437 # # By specifying a keyword argument _exception_ to +false+, you can indicate # 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. + # return the symbol +:wait_readable+ instead. def recvmsg_nonblock(dlen = nil, flags = 0, clen = nil, scm_rights: false, exception: true) __recvmsg_nonblock(dlen, flags, clen, scm_rights, exception) @@ -517,8 +514,7 @@ class Socket < BasicSocket https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L514 # # By specifying a keyword argument _exception_ to +false+, you can indicate # 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. + # return the symbol +:wait_readable+ instead. # # === See # * Socket#recvfrom @@ -575,8 +571,7 @@ class Socket < BasicSocket https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L571 # # By specifying a keyword argument _exception_ to +false+, you can indicate # that accept_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. + # return the symbol +:wait_readable+ instead. # # === See # * Socket#accept @@ -1195,8 +1190,7 @@ class Socket < BasicSocket https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L1190 # # By specifying a keyword argument _exception_ to +false+, you can indicate # that connect_nonblock should not raise an IO::WaitWritable exception, but - # return the symbol +:wait_writable+ instead. At EOF, it will return +nil+ - # instead of raising EOFError. + # return the symbol +:wait_writable+ instead. # # === See # # Socket#connect @@ -1254,8 +1248,7 @@ class UDPSocket < IPSocket https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L1248 # # By specifying a keyword argument _exception_ to +false+, you can indicate # 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. + # return the symbol +:wait_readable+ instead. # # === See # * Socket#recvfrom @@ -1296,8 +1289,7 @@ class TCPServer < TCPSocket https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L1289 # # By specifying a keyword argument _exception_ to +false+, you can indicate # that accept_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. + # return the symbol +:wait_readable+ instead. # # === See # * TCPServer#accept @@ -1338,8 +1330,7 @@ class UNIXServer < UNIXSocket https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L1330 # # By specifying a keyword argument _exception_ to +false+, you can indicate # that accept_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. + # return the symbol +:wait_readable+ instead. # # === See # * UNIXServer#accept Index: ext/openssl/ossl_ssl.c =================================================================== --- ext/openssl/ossl_ssl.c (revision 57693) +++ ext/openssl/ossl_ssl.c (revision 57694) @@ -1601,8 +1601,7 @@ ossl_ssl_connect(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_ssl.c#L1601 * By specifying a keyword argument _exception_ to +false+, you can indicate * that connect_nonblock should not raise an IO::WaitReadable or * IO::WaitWritable exception, but return the symbol +:wait_readable+ or - * +:wait_writable+ instead. At EOF, it will return +nil+ instead of raising - * EOFError. + * +:wait_writable+ instead. */ static VALUE ossl_ssl_connect_nonblock(int argc, VALUE *argv, VALUE self) @@ -1650,8 +1649,7 @@ ossl_ssl_accept(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_ssl.c#L1649 * By specifying a keyword argument _exception_ to +false+, you can indicate * that accept_nonblock should not raise an IO::WaitReadable or * IO::WaitWritable exception, but return the symbol +:wait_readable+ or - * +:wait_writable+ instead. At EOF, it will return +nil+ instead of raising - * EOFError. + * +:wait_writable+ instead. */ static VALUE ossl_ssl_accept_nonblock(int argc, VALUE *argv, VALUE self) Index: ext/openssl/lib/openssl/buffering.rb =================================================================== --- ext/openssl/lib/openssl/buffering.rb (revision 57693) +++ ext/openssl/lib/openssl/buffering.rb (revision 57694) @@ -379,8 +379,7 @@ module OpenSSL::Buffering https://github.com/ruby/ruby/blob/trunk/ext/openssl/lib/openssl/buffering.rb#L379 # # By specifying a keyword argument _exception_ to +false+, you can indicate # that write_nonblock should not raise an IO::Wait*able exception, but - # return the symbol +:wait_writable+ or +:wait_readable+ instead. At EOF, - # it will return +nil+ instead of raising EOFError. + # return the symbol +:wait_writable+ or +:wait_readable+ instead. def write_nonblock(s, exception: true) flush Index: prelude.rb =================================================================== --- prelude.rb (revision 57693) +++ prelude.rb (revision 57694) @@ -129,8 +129,7 @@ class IO https://github.com/ruby/ruby/blob/trunk/prelude.rb#L129 # # By specifying a keyword argument _exception_ to +false+, you can indicate # that write_nonblock should not raise an IO::WaitWritable exception, but - # return the symbol +:wait_writable+ instead. At EOF, it will return nil - # instead of raising EOFError. + # return the symbol +:wait_writable+ instead. def write_nonblock(buf, exception: true) __write_nonblock(buf, exception) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/