diff options
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -7607,8 +7607,8 @@ rb_io_s_for_fd(int argc, VALUE *argv, VALUE klass) static VALUE rb_io_autoclose_p(VALUE io) { - rb_io_t *fptr; - GetOpenFile(io, fptr); + rb_io_t *fptr = RFILE(io)->fptr; + rb_io_check_closed(fptr); return (fptr->mode & FMODE_PREP) ? Qfalse : Qtrue; } |