[前][次][番号順一覧][スレッド一覧]

ruby-changes:70997

From: Nobuyoshi <ko1@a...>
Date: Mon, 24 Jan 2022 18:04:01 +0900 (JST)
Subject: [ruby-changes:70997] 85502f3a51 (master): [ruby/io-wait] [DOC] Fix the return values [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=85502f3a51

From 85502f3a51db76f0e642b21665ee8d9638a512d7 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 24 Jan 2022 17:58:46 +0900
Subject: [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
---
 ext/io/wait/wait.c | 39 ++++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/ext/io/wait/wait.c b/ext/io/wait/wait.c
index 74a1b49ee53..568c7b54a8c 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) https://github.com/ruby/ruby/blob/trunk/ext/io/wait/wait.c#L121
 
 /*
  * 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) https://github.com/ruby/ruby/blob/trunk/ext/io/wait/wait.c#L153
 
 /*
  * 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) https://github.com/ruby/ruby/blob/trunk/ext/io/wait/wait.c#L195
 
 /*
  * 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) https://github.com/ruby/ruby/blob/trunk/ext/io/wait/wait.c#L232
 #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) https://github.com/ruby/ruby/blob/trunk/ext/io/wait/wait.c#L293
 
 /*
  * 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+.
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]