diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2022-10-07 22:51:27 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 22:51:27 +1300 |
commit | a081fe76de5de0307651d99324a0e454fd8b8a8b (patch) | |
tree | 06d6a9a2b44aa950d72a0eff853a5984e9002c14 /include | |
parent | e4f91bbdbaa6ab3125f24967414ac5300bb244f5 (diff) |
Simplify default argument specification. (#6507)
Notes
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/io.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/ruby/io.h b/include/ruby/io.h index b91ecd00cb..bb3bb9cd53 100644 --- a/include/ruby/io.h +++ b/include/ruby/io.h @@ -58,6 +58,9 @@ // IO#wait, IO#wait_readable, IO#wait_writable, IO#wait_priority are defined by this implementation. #define RUBY_IO_WAIT_METHODS +// Used as the default timeout argument to `rb_io_wait` to use the `IO#timeout` value. +#define RUBY_IO_TIMEOUT_DEFAULT Qundef + RBIMPL_SYMBOL_EXPORT_BEGIN() struct stat; @@ -884,6 +887,8 @@ VALUE rb_io_set_timeout(VALUE io, VALUE timeout); * @param[in] io An IO object to wait. * @param[in] events See above. * @param[in] timeout Time, or numeric seconds since UNIX epoch. + * If Qnil, wait forever. If Qundef, use the + * default timeout. * @exception rb_eIOError `io` is not open. * @exception rb_eRangeError `timeout` is out of range. * @exception rb_eSystemCallError `select(2)` failed for some reason. |