summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-01-24 17:58:46 +0900
committergit <svn-admin@ruby-lang.org>2022-01-24 18:03:48 +0900
commit85502f3a51db76f0e642b21665ee8d9638a512d7 (patch)
tree0b3901cb6b9dba3158dcf9c5723fb852bd9e508d
parente7b573e5768956b110c25b2cab02a889f2e8cc8e (diff)
[ruby/io-wait] [DOC] Fix the return values [ci skip]
Even since 0.1.0, other than +true+ or +false+ may be returned. https://github.com/ruby/io-wait/commit/d0721e300a
-rw-r--r--ext/io/wait/wait.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/ext/io/wait/wait.c b/ext/io/wait/wait.c
index 74a1b49ee5..568c7b54a8 100644
--- a/ext/io/wait/wait.c
+++ b/ext/io/wait/wait.c
@@ -121,9 +121,10 @@ io_wait_event(VALUE io, int event, VALUE timeout)
/*
* call-seq:
- * io.ready? -> true or false
+ * io.ready? -> truthy or falsy
*
- * Returns +true+ if input available without blocking, or +false+.
+ * Returns a truthy value if input available without blocking, or a
+ * falsy value.
*
* You must require 'io/wait' to use this method.
*/
@@ -152,12 +153,12 @@ io_ready_p(VALUE io)
/*
* call-seq:
- * io.wait_readable -> true or false
- * io.wait_readable(timeout) -> true or false
+ * io.wait_readable -> truthy or falsy
+ * io.wait_readable(timeout) -> truthy or falsy
*
- * Waits until IO is readable and returns +true+, or
- * +false+ when times out.
- * Returns +true+ immediately when buffered data is available.
+ * Waits until IO is readable and returns a truthy value, or a falsy
+ * value when times out. Returns a truthy value immediately when
+ * buffered data is available.
*
* You must require 'io/wait' to use this method.
*/
@@ -194,11 +195,11 @@ io_wait_readable(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * io.wait_writable -> true or false
- * io.wait_writable(timeout) -> true or false
+ * io.wait_writable -> truthy or falsy
+ * io.wait_writable(timeout) -> truthy or falsy
*
- * Waits until IO is writable and returns +true+ or
- * +false+ when times out.
+ * Waits until IO is writable and returns a truthy value or a falsy
+ * value when times out.
*
* You must require 'io/wait' to use this method.
*/
@@ -231,11 +232,11 @@ io_wait_writable(int argc, VALUE *argv, VALUE io)
#ifdef HAVE_RB_IO_WAIT
/*
* call-seq:
- * io.wait_priority -> true or false
- * io.wait_priority(timeout) -> true or false
+ * io.wait_priority -> truthy or falsy
+ * io.wait_priority(timeout) -> truthy or falsy
*
- * Waits until IO is priority and returns +true+ or
- * +false+ when times out.
+ * Waits until IO is priority and returns a truthy value or a falsy
+ * value when times out.
*
* You must require 'io/wait' to use this method.
*/
@@ -292,16 +293,16 @@ wait_mode_sym(VALUE mode)
/*
* call-seq:
- * io.wait(events, timeout) -> event mask or false.
- * io.wait(timeout = nil, mode = :read) -> event mask or false.
+ * io.wait(events, timeout) -> truthy or falsy
+ * io.wait(timeout = nil, mode = :read) -> truthy or falsy.
*
* Waits until the IO becomes ready for the specified events and returns the
- * subset of events that become ready, or +false+ when times out.
+ * subset of events that become ready, or a falsy value when times out.
*
* The events can be a bit mask of +IO::READABLE+, +IO::WRITABLE+ or
* +IO::PRIORITY+.
*
- * Returns +true+ immediately when buffered data is available.
+ * Returns a truthy value immediately when buffered data is available.
*
* Optional parameter +mode+ is one of +:read+, +:write+, or
* +:read_write+.