Maintenance Ruby 3.3 gets fixes, but no new features. 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 RBOOL(!(fptr->mode & FMODE_EXTERNAL));
}
Returns true if the underlying file descriptor of ios will be closed at its finalization or at calling close, otherwise false.