@@ -77,6 +77,8 @@ wait_for_single_fd(rb_io_t *fptr, int events, struct timeval *tv)
7777 *
7878 * Returns number of bytes that can be read without blocking.
7979 * Returns zero if no information available.
80+ *
81+ * You must require 'io/wait' to use this method.
8082 */
8183
8284static VALUE
@@ -119,9 +121,12 @@ io_wait_event(VALUE io, int event, VALUE timeout)
119121
120122/*
121123 * call-seq:
122- * io.ready? -> true or false
124+ * io.ready? -> truthy or falsy
125+ *
126+ * Returns a truthy value if input available without blocking, or a
127+ * falsy value.
123128 *
124- * Returns +true+ if input available without blocking, or +false+ .
129+ * You must require 'io/wait' to use this method .
125130 */
126131
127132static VALUE
@@ -148,12 +153,14 @@ io_ready_p(VALUE io)
148153
149154/*
150155 * call-seq:
151- * io.wait_readable -> true or false
152- * io.wait_readable(timeout) -> true or false
156+ * io.wait_readable -> truthy or falsy
157+ * io.wait_readable(timeout) -> truthy or falsy
158+ *
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.
153162 *
154- * Waits until IO is readable and returns +true+, or
155- * +false+ when times out.
156- * Returns +true+ immediately when buffered data is available.
163+ * You must require 'io/wait' to use this method.
157164 */
158165
159166static VALUE
@@ -188,11 +195,13 @@ io_wait_readable(int argc, VALUE *argv, VALUE io)
188195
189196/*
190197 * call-seq:
191- * io.wait_writable -> true or false
192- * io.wait_writable(timeout) -> true or false
198+ * io.wait_writable -> truthy or falsy
199+ * io.wait_writable(timeout) -> truthy or falsy
193200 *
194- * Waits until IO is writable and returns +true+ or
195- * +false+ when times out.
201+ * Waits until IO is writable and returns a truthy value or a falsy
202+ * value when times out.
203+ *
204+ * You must require 'io/wait' to use this method.
196205 */
197206static VALUE
198207io_wait_writable (int argc , VALUE * argv , VALUE io )
@@ -223,11 +232,13 @@ io_wait_writable(int argc, VALUE *argv, VALUE io)
223232#ifdef HAVE_RB_IO_WAIT
224233/*
225234 * call-seq:
226- * io.wait_priority -> true or false
227- * io.wait_priority(timeout) -> true or false
235+ * io.wait_priority -> truthy or falsy
236+ * io.wait_priority(timeout) -> truthy or falsy
237+ *
238+ * Waits until IO is priority and returns a truthy value or a falsy
239+ * value when times out.
228240 *
229- * Waits until IO is priority and returns +true+ or
230- * +false+ when times out.
241+ * You must require 'io/wait' to use this method.
231242 */
232243static VALUE
233244io_wait_priority (int argc , VALUE * argv , VALUE io )
@@ -282,19 +293,21 @@ wait_mode_sym(VALUE mode)
282293
283294/*
284295 * call-seq:
285- * io.wait(events, timeout) -> event mask or false.
286- * 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 .
287298 *
288299 * Waits until the IO becomes ready for the specified events and returns the
289- * 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.
290301 *
291302 * The events can be a bit mask of +IO::READABLE+, +IO::WRITABLE+ or
292303 * +IO::PRIORITY+.
293304 *
294- * Returns +true+ immediately when buffered data is available.
305+ * Returns a truthy value immediately when buffered data is available.
295306 *
296307 * Optional parameter +mode+ is one of +:read+, +:write+, or
297308 * +:read_write+.
309+ *
310+ * You must require 'io/wait' to use this method.
298311 */
299312
300313static VALUE
0 commit comments