summaryrefslogtreecommitdiff
path: root/prelude.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-12 07:53:34 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-12 07:53:34 +0000
commit3eaded77007e1b8f6c256eca662b11639560c1e3 (patch)
treee7b527972ce7544bd91e8df238133153990a9228 /prelude.rb
parent49bffd952ca39eee39bc92f1ce4636f3ce7ffb66 (diff)
merge revision(s) 57690-57694:
rational.c: infinity in power * rational.c (nurat_expt): return 0 due to overflow. [ruby-core:79686] [Bug #13242]: ------------------------------------------------------------------------ r57690 | nobu | 2017-02-23 10:15:27 +0900 (Thu, 23 Feb 2017) | 7 lines [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> ------------------------------------------------------------------------ r57691 | nobu | 2017-02-23 10:54:13 +0900 (Thu, 23 Feb 2017) | 11 lines 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. ------------------------------------------------------------------------ r57692 | nobu | 2017-02-23 11:00:28 +0900 (Thu, 23 Feb 2017) | 1 line [DOC] keyword argument _exception_ ------------------------------------------------------------------------ r57693 | nobu | 2017-02-23 11:11:16 +0900 (Thu, 23 Feb 2017) | 1 line [DOC] mark up literals ------------------------------------------------------------------------ r57694 | nobu | 2017-02-23 11:40:17 +0900 (Thu, 23 Feb 2017) | 3 lines Revert r57690 except for read_nonblock https://github.com/ruby/ruby/pull/1527#issuecomment-281867551 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'prelude.rb')
-rw-r--r--prelude.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/prelude.rb b/prelude.rb
index 740aba5b79..2e72881cd5 100644
--- a/prelude.rb
+++ b/prelude.rb
@@ -68,9 +68,10 @@ class IO
# Note that this method is identical to readpartial
# except the non-blocking flag is set.
#
- # By specifying `exception: false`, the options hash allows you to indicate
+ # By specifying a keyword argument _exception_ to +false+, you can 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
@@ -126,9 +127,9 @@ class IO
# according to the kind of the IO object.
# In such cases, write_nonblock raises <code>Errno::EBADF</code>.
#
- # By specifying `exception: false`, the options hash allows you to indicate
+ # 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.
+ # return the symbol +:wait_writable+ instead.
def write_nonblock(buf, exception: true)
__write_nonblock(buf, exception)
end