summaryrefslogtreecommitdiff
path: root/ext/openssl
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-23 01:15:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-23 01:15:27 +0000
commitd5eef0301a9aa32999c075ea50fd60f0f05e8f73 (patch)
treed74941e52f441350bace15f4144de44201dccd8d /ext/openssl
parent2e2063fe16e2549123055f6f8aec5162cef01b99 (diff)
[DOC] {read,write}_nonblock with exception: false
Update docs to reflect EOF behavior change of read_nonblock and write_nonblock when using `exception: false`. [Fix GH-1527] Author: Russell Davis <russell-stripe@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/lib/openssl/buffering.rb6
-rw-r--r--ext/openssl/ossl_ssl.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/ext/openssl/lib/openssl/buffering.rb b/ext/openssl/lib/openssl/buffering.rb
index b0dffef..30df819 100644
--- a/ext/openssl/lib/openssl/buffering.rb
+++ b/ext/openssl/lib/openssl/buffering.rb
@@ -166,7 +166,8 @@ module OpenSSL::Buffering
#
# By specifying `exception: false`, the options hash allows you to indicate
# that read_nonblock should not raise an IO::Wait*able exception, but
- # return the symbol :wait_writable or :wait_readable instead.
+ # return the symbol :wait_writable or :wait_readable instead. At EOF, it will
+ # return nil instead of raising EOFError.
def read_nonblock(maxlen, buf=nil, exception: true)
if maxlen == 0
@@ -378,7 +379,8 @@ module OpenSSL::Buffering
#
# By specifying `exception: false`, the options hash allows you to indicate
# that write_nonblock should not raise an IO::Wait*able exception, but
- # return the symbol :wait_writable or :wait_readable instead.
+ # return the symbol :wait_writable or :wait_readable instead. At EOF, it will
+ # return nil instead of raising EOFError.
def write_nonblock(s, exception: true)
flush
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index eef7dbe..41d496f 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -1601,7 +1601,7 @@ ossl_ssl_connect(VALUE self)
* By specifying `exception: false`, the options hash allows you to indicate
* that connect_nonblock should not raise an IO::WaitReadable or
* IO::WaitWritable exception, but return the symbol :wait_readable or
- * :wait_writable instead.
+ * :wait_writable instead. At EOF, it will return nil instead of raising EOFError.
*/
static VALUE
ossl_ssl_connect_nonblock(int argc, VALUE *argv, VALUE self)
@@ -1649,7 +1649,7 @@ ossl_ssl_accept(VALUE self)
* By specifying `exception: false`, the options hash allows you to indicate
* that accept_nonblock should not raise an IO::WaitReadable or
* IO::WaitWritable exception, but return the symbol :wait_readable or
- * :wait_writable instead.
+ * :wait_writable instead. At EOF, it will return nil instead of raising EOFError.
*/
static VALUE
ossl_ssl_accept_nonblock(int argc, VALUE *argv, VALUE self)