summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-23 07:13:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-23 07:13:21 +0000
commitb0dd250dc95ea0fae89c3201967039d582fbf156 (patch)
treefb9483ca974a305e496eb87e960dcfecf7b9115f /vm_insnhelper.c
parent87c8c5edf43a7f7d33d5fe75f51ef410a03b93b1 (diff)
use RB_TYPE_P() instead of comparison of TYPE()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 1e9b852..e67e0b9 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -153,7 +153,7 @@ unknown_keyword_error(const rb_iseq_t *iseq, VALUE hash)
rb_hash_delete(hash, ID2SYM(iseq->arg_keyword_table[i]));
}
keys = rb_funcall(hash, rb_intern("keys"), 0, 0);
- if (TYPE(keys) != T_ARRAY) rb_raise(rb_eArgError, "unknown keyword");
+ if (!RB_TYPE_P(keys, T_ARRAY)) rb_raise(rb_eArgError, "unknown keyword");
msg = RARRAY_LEN(keys) == 1 ? "unknown keyword: %s" : "unknown keywords: %s";
keys = rb_funcall(keys, rb_intern("join"), 1, sep);
RB_GC_GUARD(keys);