summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index d58380581e..abc5546d71 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1324,7 +1324,7 @@ r_entry0(VALUE v, st_index_t num, struct load_arg *arg)
st_insert(arg->data, num, (st_data_t)v);
}
if (arg->infection &&
- TYPE(v) != T_CLASS && TYPE(v) != T_MODULE) {
+ !RB_TYPE_P(v, T_CLASS) && !RB_TYPE_P(v, T_MODULE)) {
FL_SET(v, arg->infection);
if ((VALUE)real_obj != Qundef)
FL_SET((VALUE)real_obj, arg->infection);