summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/object.c b/object.c
index a6ded56724..031d2afdc8 100644
--- a/object.c
+++ b/object.c
@@ -99,6 +99,8 @@ rb_obj_equal(VALUE obj1, VALUE obj2)
VALUE
rb_class_real(VALUE cl)
{
+ if (cl == 0)
+ return 0;
while ((RBASIC(cl)->flags & FL_SINGLETON) || BUILTIN_TYPE(cl) == T_ICLASS) {
cl = RCLASS_SUPER(cl);
}