From df62d6522a6f679642e9b10dbf1edb1d9b646e91 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 4 Nov 2019 09:14:18 +0900 Subject: [PATCH] Use the dedicated function `rb_io_check_io` --- process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process.c b/process.c index 652fdafdfe..6fa3270e5c 100644 --- a/process.c +++ b/process.c @@ -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)