summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'process.c')
-rw-r--r--process.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/process.c b/process.c
index 3aacc5d60b..16e6e6a568 100644
--- a/process.c
+++ b/process.c
@@ -1456,6 +1456,7 @@ check_exec_redirect(VALUE key, VALUE val, struct rb_execarg *eargp)
{
VALUE param;
VALUE path, flags, perm;
+ VALUE tmp;
ID id;
switch (TYPE(val)) {
@@ -1484,6 +1485,7 @@ check_exec_redirect(VALUE key, VALUE val, struct rb_execarg *eargp)
break;
case T_FILE:
+ io:
val = check_exec_redirect_fd(val, 0);
/* fall through */
case T_FIXNUM:
@@ -1531,6 +1533,9 @@ check_exec_redirect(VALUE key, VALUE val, struct rb_execarg *eargp)
break;
default:
+ tmp = val;
+ val = rb_io_check_io(tmp);
+ if (!NIL_P(val)) goto io;
rb_raise(rb_eArgError, "wrong exec redirect action");
}