aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--process.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/process.c b/process.c
index 5fc0bed6b1..42fbad0559 100644
--- a/process.c
+++ b/process.c
@@ -2743,7 +2743,8 @@ run_exec_open(VALUE ary, struct rb_execarg *sargp, char *errmsg, size_t errmsg_b
VALUE elt = RARRAY_AREF(ary, i);
int fd = FIX2INT(RARRAY_AREF(elt, 0));
VALUE param = RARRAY_AREF(elt, 1);
- char *path = RSTRING_PTR(RARRAY_AREF(param, 0));
+ const VALUE vpath = RARRAY_AREF(param, 0);
+ const char *path = RSTRING_PTR(vpath);
int flags = NUM2INT(RARRAY_AREF(param, 1));
int perm = NUM2INT(RARRAY_AREF(param, 2));
int need_close = 1;