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
This commit is contained in:
ko1 2018-10-10 04:20:17 +00:00
parent 4ed087b0db
commit eed1deecba

View File

@ -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;
}