End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
IO#nonblock?
io.nonblock? → boolean
ext/io/nonblock/nonblock.c
View on GitHub ↗
static VALUE
rb_io_nonblock_p(VALUE io)
{
rb_io_t *fptr;
GetOpenFile(io, fptr);
if (io_nonblock_mode(fptr->fd) & O_NONBLOCK)
return Qtrue;
return Qfalse;
}
Returns true if an IO object is in non-blocking mode.
Ruby version changes
-
3.0
-
IO#nonblock?now defaults totrue. [Feature #16786]
-