Prefer to use RTEST when checking result of rb_io_wait
. (#5341)
* Prefer to use RTEST when checking result of `rb_io_wait`. * Consistently use false for signifying no events ready.
This commit is contained in:
parent
4f74153846
commit
548c8f5f7a
Notes:
git
2025-06-06 00:31:58 +00:00
Merged-By: ioquatix <samuel@codeotaku.com>
@ -556,7 +556,7 @@ console_getch(int argc, VALUE *argv, VALUE io)
|
||||
if (!(w & RB_WAITFD_IN)) return Qnil;
|
||||
# else
|
||||
VALUE result = rb_io_wait(io, RUBY_IO_READABLE, timeout);
|
||||
if (result == Qfalse) return Qnil;
|
||||
if (!RTEST(result)) return Qnil;
|
||||
# endif
|
||||
}
|
||||
else if (optp->vtime) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user