summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-15 01:09:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-15 01:09:17 +0000
commitefc70c74c215ddecc58d53fc7dcf9925a9f631ac (patch)
tree2b67debd8750b51e59935230fbe7b94e813e50d7
parentdcae4b9d422e0303aa05f988ee7fd12af8adce62 (diff)
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
-rw-r--r--process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/process.c b/process.c
index d4977eb..5fc0bed 100644
--- a/process.c
+++ b/process.c
@@ -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];