diff options
author | Peter Zhu <peter@peterzhu.ca> | 2024-02-27 15:09:18 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2024-02-27 21:11:11 -0500 |
commit | e8e2415bb32c7e9f2a55d218a97cb5f9474b2898 (patch) | |
tree | 6f997267ca6952b39f9a34777d6e9dd61463db79 /marshal.c | |
parent | 95e55e9ae4a446a62db21e2ea91c54d20fbdcbdc (diff) |
Use RB_SPECIAL_CONST_P instead of rb_special_const_p
rb_special_const_p returns a VALUE (Qtrue or Qfalse), so we shouldn't
assume that Qfalse is 0. We should instead use RB_SPECIAL_CONST_P.
Diffstat (limited to 'marshal.c')
-rw-r--r-- | marshal.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1889,7 +1889,7 @@ r_object_for(struct load_arg *arg, bool partial, int *ivp, VALUE extmod, int typ goto type_hash; } v = r_object_for(arg, partial, 0, extmod, type); - if (rb_special_const_p(v) || RB_TYPE_P(v, T_OBJECT) || RB_TYPE_P(v, T_CLASS)) { + if (RB_SPECIAL_CONST_P(v) || RB_TYPE_P(v, T_OBJECT) || RB_TYPE_P(v, T_CLASS)) { goto format_error; } if (RB_TYPE_P(v, T_MODULE) || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) { |