summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2023-12-24 14:20:35 +0900
committerKoichi Sasada <ko1@atdot.net>2023-12-24 14:53:46 +0900
commit541371e286d2f139c49e7805f6f229618eb63144 (patch)
tree24f2e8355ad79d73e855734a8a1342e6e101cdf4 /thread.c
parent0fef890b4fbe64a319247fee9d2cb13f45b76844 (diff)
accept `RB_WAITFD_IN | RB_WAITFD_OUT` for waiting events
Assrsion was `events == RB_WAITFD_IN || events == RB_WAITFD_OUT` but it should accept `RB_WAITFD_IN | RB_WAITFD_OUT`.
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index ed71102007..720f07394d 100644
--- a/thread.c
+++ b/thread.c
@@ -1706,7 +1706,7 @@ thread_io_wait_events(rb_thread_t *th, rb_execution_context_t *ec, int fd, int e
prel = NULL;
}
- VM_ASSERT(prel || events == RB_WAITFD_IN || events == RB_WAITFD_OUT);
+ VM_ASSERT(prel || (events & (RB_WAITFD_IN | RB_WAITFD_OUT)));
thread_io_setup_wfd(th, fd, wfd);
{