aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--object.c1
2 files changed, 6 insertions, 0 deletions
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 <matz@ruby-lang.org>
+
+ * object.c (rb_class_superclass): should not raise exception for
+ BasicObject. [ruby-Bugs-15668]
+
Mon Nov 19 16:04:08 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* 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) {