1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

process.c: use RB_TYPE_P

* process.c (check_exec_redirect): use RB_TYPE_P instead of single
  comparison of TYPE().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-06-15 01:09:17 +00:00
parent dcae4b9d42
commit efc70c74c2

View file

@ -1595,7 +1595,7 @@ check_exec_redirect(VALUE key, VALUE val, struct rb_execarg *eargp)
key = check_exec_redirect_fd(key, 1);
if (FIXNUM_P(key) && (FIX2INT(key) == 1 || FIX2INT(key) == 2))
flags = INT2NUM(O_WRONLY|O_CREAT|O_TRUNC);
else if (TYPE(key) == T_ARRAY) {
else if (RB_TYPE_P(key, T_ARRAY)) {
int i;
for (i = 0; i < RARRAY_LEN(key); i++) {
VALUE v = RARRAY_PTR(key)[i];