diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-23 01:15:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-23 01:15:27 +0000 |
commit | afaa95d8d50041cab202fecf552cd1c31a8ef3b6 (patch) | |
tree | d74941e52f441350bace15f4144de44201dccd8d /prelude.rb | |
parent | c053c35ecd4a83ff2b89270f06d7620d93b2c8f8 (diff) | |
download | ruby-afaa95d8d50041cab202fecf552cd1c31a8ef3b6.tar.gz |
[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 'prelude.rb')
-rw-r--r-- | prelude.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/prelude.rb b/prelude.rb index 231c64e95a..5ebf1166ea 100644 --- a/prelude.rb +++ b/prelude.rb @@ -70,7 +70,8 @@ class IO # # By specifying `exception: false`, the options hash allows you to indicate # that read_nonblock should not raise an IO::WaitReadable exception, but - # return the symbol :wait_readable instead. + # return the symbol :wait_readable instead. At EOF, it will return nil instead + # of raising EOFError. def read_nonblock(len, buf = nil, exception: true) __read_nonblock(len, buf, exception) end @@ -128,7 +129,8 @@ class IO # # By specifying `exception: false`, the options hash allows you to indicate # that write_nonblock should not raise an IO::WaitWritable exception, but - # return the symbol :wait_writable instead. + # return the symbol :wait_writable instead. At EOF, it will return nil instead + # of raising EOFError. def write_nonblock(buf, exception: true) __write_nonblock(buf, exception) end |