diff --git a/ChangeLog b/ChangeLog index 39d885dcea..a13d726ff7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Nov 19 17:48:30 2007 Yukihiro Matsumoto + + * object.c (rb_class_superclass): should not raise exception for + BasicObject. [ruby-Bugs-15668] + Mon Nov 19 16:04:08 2007 Yukihiro Matsumoto * array.c (rb_ary_permutation): gives all permutations of elements diff --git a/object.c b/object.c index edec861a20..0ecb408bae 100644 --- a/object.c +++ b/object.c @@ -1410,6 +1410,7 @@ rb_class_superclass(VALUE klass) VALUE super = RCLASS_SUPER(klass); if (!super) { + if (klass == rb_cBasicObject) return Qnil; rb_raise(rb_eTypeError, "uninitialized class"); } while (TYPE(super) == T_ICLASS) {