diff options
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -203,9 +203,8 @@ rb_obj_not_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) { + while (cl && + ((RBASIC(cl)->flags & FL_SINGLETON) || BUILTIN_TYPE(cl) == T_ICLASS)) { cl = RCLASS_SUPER(cl); } return cl; |