summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index a76d5c81bc..1024c1a50e 100644
--- a/gc.c
+++ b/gc.c
@@ -1639,7 +1639,7 @@ id2ref(obj, id)
if (!is_pointer_to_heap((void *)ptr)) {
rb_raise(rb_eRangeError, "0x%lx is not id value", p0);
}
- if (BUILTIN_TYPE(ptr) == 0) {
+ if (RBASIC(ptr)->klass == 0) {
rb_raise(rb_eRangeError, "0x%lx is recycled object", p0);
}
return (VALUE)ptr;