summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-28 02:15:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-28 02:15:48 +0000
commitc1ef657b39c153f49660c15f88c31645a710cb98 (patch)
treec04e2861a83e51a8225be5e5985f34a3a27da12d /insns.def
parentdc54eeccc83c8c8e868fe7a3c058cee80d3abb0c (diff)
insns.def: RB_TYPE_P
* insns.def (checkincludearray, defineclass, opt_regexpmatch2): use RB_TYPE_P(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def8
1 files changed, 4 insertions, 4 deletions
diff --git a/insns.def b/insns.def
index 772a0e8c53..5a0726cf39 100644
--- a/insns.def
+++ b/insns.def
@@ -553,7 +553,7 @@ checkincludearray
int i;
result = Qfalse;
- if (TYPE(ary) != T_ARRAY) {
+ if (!RB_TYPE_P(ary, T_ARRAY)) {
ary = rb_Array(ary);
}
@@ -910,7 +910,7 @@ defineclass
if ((klass = vm_search_const_defined_class(cbase, id)) != 0) {
/* already exist */
klass = define_type == 0 ? rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
- if (TYPE(klass) != T_CLASS) {
+ if (!RB_TYPE_P(klass, T_CLASS)) {
rb_raise(rb_eTypeError, "%s is not a class", rb_id2name(id));
}
@@ -948,7 +948,7 @@ defineclass
if ((klass = vm_search_const_defined_class(cbase, id)) != 0) {
klass = define_type == 2 ? rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
/* already exist */
- if (TYPE(klass) != T_MODULE) {
+ if (!RB_TYPE_P(klass, T_MODULE)) {
rb_raise(rb_eTypeError, "%s is not a module", rb_id2name(id));
}
}
@@ -2093,7 +2093,7 @@ opt_regexpmatch2
(VALUE obj2, VALUE obj1)
(VALUE val)
{
- if (TYPE(obj2) == T_STRING) {
+ if (RB_TYPE_P(obj2, T_STRING)) {
val = rb_reg_match(obj1, obj2);
}
else {