diff options
Diffstat (limited to 'gc.c')
| -rw-r--r-- | gc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2069,7 +2069,8 @@ id2ref(VALUE obj, VALUE objid) return ID2SYM(symid); } - if (!is_pointer_to_heap((void *)ptr) || BUILTIN_TYPE(ptr) >= T_VALUES) { + if (!is_pointer_to_heap((void *)ptr) || + BUILTIN_TYPE(ptr) >= T_VALUES || BUILTIN_TYPE(ptr) == T_ICLASS) { rb_raise(rb_eRangeError, "%p is not id value", p0); } if (BUILTIN_TYPE(ptr) == 0 || RBASIC(ptr)->klass == 0) { |
