aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-10 04:20:17 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-10 04:20:17 +0000
commiteed1deecbad200c0b79da719fd83147a9ef6cf77 (patch)
tree65d9c16d0d7750c643f009112345ef8e142b4f5c /process.c
parent4ed087b0db4c11d743762615e2d3759b8c2aaf66 (diff)
downloadruby-eed1deecbad200c0b79da719fd83147a9ef6cf77.tar.gz
revisit `RARRAY_PTR()`.
* process.c (check_exec_redirect): use RARRAY_AREF() instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/process.c b/process.c
index 1ca7847df2..76a5119c9c 100644
--- a/process.c
+++ b/process.c
@@ -1899,7 +1899,7 @@ check_exec_redirect(VALUE key, VALUE val, struct rb_execarg *eargp)
else if (RB_TYPE_P(key, T_ARRAY)) {
int i;
for (i = 0; i < RARRAY_LEN(key); i++) {
- VALUE v = RARRAY_PTR(key)[i];
+ VALUE v = RARRAY_AREF(key, i);
VALUE fd = check_exec_redirect_fd(v, 1);
if (FIX2INT(fd) != 1 && FIX2INT(fd) != 2) break;
}