Skip to content

Commit d0721e3

Browse files
committed
[DOC] Fix the return values [ci skip]
Even since 0.1.0, other than +true+ or +false+ may be returned.
1 parent 2beb05b commit d0721e3

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

ext/io/wait/wait.c

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,10 @@ io_wait_event(VALUE io, int event, VALUE timeout)
121121

122122
/*
123123
* call-seq:
124-
* io.ready? -> true or false
124+
* io.ready? -> truthy or falsy
125125
*
126-
* Returns +true+ if input available without blocking, or +false+.
126+
* Returns a truthy value if input available without blocking, or a
127+
* falsy value.
127128
*
128129
* You must require 'io/wait' to use this method.
129130
*/
@@ -152,12 +153,12 @@ io_ready_p(VALUE io)
152153

153154
/*
154155
* call-seq:
155-
* io.wait_readable -> true or false
156-
* io.wait_readable(timeout) -> true or false
156+
* io.wait_readable -> truthy or falsy
157+
* io.wait_readable(timeout) -> truthy or falsy
157158
*
158-
* Waits until IO is readable and returns +true+, or
159-
* +false+ when times out.
160-
* Returns +true+ immediately when buffered data is available.
159+
* Waits until IO is readable and returns a truthy value, or a falsy
160+
* value when times out. Returns a truthy value immediately when
161+
* buffered data is available.
161162
*
162163
* You must require 'io/wait' to use this method.
163164
*/
@@ -194,11 +195,11 @@ io_wait_readable(int argc, VALUE *argv, VALUE io)
194195

195196
/*
196197
* call-seq:
197-
* io.wait_writable -> true or false
198-
* io.wait_writable(timeout) -> true or false
198+
* io.wait_writable -> truthy or falsy
199+
* io.wait_writable(timeout) -> truthy or falsy
199200
*
200-
* Waits until IO is writable and returns +true+ or
201-
* +false+ when times out.
201+
* Waits until IO is writable and returns a truthy value or a falsy
202+
* value when times out.
202203
*
203204
* You must require 'io/wait' to use this method.
204205
*/
@@ -231,11 +232,11 @@ io_wait_writable(int argc, VALUE *argv, VALUE io)
231232
#ifdef HAVE_RB_IO_WAIT
232233
/*
233234
* call-seq:
234-
* io.wait_priority -> true or false
235-
* io.wait_priority(timeout) -> true or false
235+
* io.wait_priority -> truthy or falsy
236+
* io.wait_priority(timeout) -> truthy or falsy
236237
*
237-
* Waits until IO is priority and returns +true+ or
238-
* +false+ when times out.
238+
* Waits until IO is priority and returns a truthy value or a falsy
239+
* value when times out.
239240
*
240241
* You must require 'io/wait' to use this method.
241242
*/
@@ -292,16 +293,16 @@ wait_mode_sym(VALUE mode)
292293

293294
/*
294295
* call-seq:
295-
* io.wait(events, timeout) -> event mask or false.
296-
* io.wait(timeout = nil, mode = :read) -> event mask or false.
296+
* io.wait(events, timeout) -> truthy or falsy
297+
* io.wait(timeout = nil, mode = :read) -> truthy or falsy.
297298
*
298299
* Waits until the IO becomes ready for the specified events and returns the
299-
* subset of events that become ready, or +false+ when times out.
300+
* subset of events that become ready, or a falsy value when times out.
300301
*
301302
* The events can be a bit mask of +IO::READABLE+, +IO::WRITABLE+ or
302303
* +IO::PRIORITY+.
303304
*
304-
* Returns +true+ immediately when buffered data is available.
305+
* Returns a truthy value immediately when buffered data is available.
305306
*
306307
* Optional parameter +mode+ is one of +:read+, +:write+, or
307308
* +:read_write+.

0 commit comments

Comments
 (0)