1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use the dedicated function rb_io_check_io

This commit is contained in:
Nobuyoshi Nakada 2019-11-04 09:14:18 +09:00
parent 5a7487bdcd
commit df62d6522a
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -1840,7 +1840,7 @@ check_exec_redirect_fd(VALUE v, int iskey)
else
goto wrong;
}
else if (!NIL_P(tmp = rb_check_convert_type_with_id(v, T_FILE, "IO", idTo_io))) {
else if (!NIL_P(tmp = rb_io_check_io(v))) {
rb_io_t *fptr;
GetOpenFile(tmp, fptr);
if (fptr->tied_io_for_writing)