aboutsummaryrefslogtreecommitdiffstats
path: root/prelude.rb
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-07 14:08:44 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-07 14:08:44 +0000
commit4b94880f19678e56f5472fe5eeea4129e4186b63 (patch)
treee9bc9051e6d6244426dc23598791f24c56520e37 /prelude.rb
parent103f6a0de4ee0218b43c0042c2ad9e6bd4d3c16d (diff)
downloadruby-4b94880f19678e56f5472fe5eeea4129e4186b63.tar.gz
add missing options to call-seq of IO#read_nonblock
* prelude.rb (IO#read_nonblock): [DOC] add missing options to call-seq. [ruby-core:71627] [Bug #11730] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'prelude.rb')
-rw-r--r--prelude.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/prelude.rb b/prelude.rb
index 8a172a22e9..80f178d3bd 100644
--- a/prelude.rb
+++ b/prelude.rb
@@ -18,8 +18,8 @@ end
class IO
# call-seq:
- # ios.read_nonblock(maxlen) -> string
- # ios.read_nonblock(maxlen, outbuf) -> outbuf
+ # ios.read_nonblock(maxlen [, options]) -> string
+ # ios.read_nonblock(maxlen, outbuf [, options]) -> outbuf
#
# Reads at most <i>maxlen</i> bytes from <em>ios</em> using
# the read(2) system call after O_NONBLOCK is set for
@@ -66,6 +66,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
+ # that read_nonblock should not raise an IO::WaitReadable exception, but
+ # return the symbol :wait_readable instead.
def read_nonblock(len, buf = nil, exception: true)
__read_nonblock(len, buf, exception)
end