End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
IO#autoclose?
ios.autoclose? → true or false
io.c
View on GitHub ↗
static VALUE
rb_io_autoclose_p(VALUE io)
{
rb_io_t *fptr = RFILE(io)->fptr;
rb_io_check_closed(fptr);
return (fptr->mode & FMODE_PREP) ? Qfalse : Qtrue;
}
Returns true if the underlying file descriptor of ios will be closed automatically at its finalization, otherwise false.