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 {