summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-11 15:36:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-11 15:36:52 +0000
commite360e660f592d674794c99d2f8e6eaf039694fda (patch)
tree261a79eade48bdd75cf381e749e18bd8ee372a57
parentbac07e4f29a01866061fa0600c02eb1237b06dd2 (diff)
downloadruby-e360e660f592d674794c99d2f8e6eaf039694fda.tar.gz
ruby-e360e660f592d674794c99d2f8e6eaf039694fda.tar.xz
ruby-e360e660f592d674794c99d2f8e6eaf039694fda.zip
* object.c (rb_class_superclass): superclass of singleton class also
should be a singleton class. fixed: [ruby-list:40519] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--object.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a7c428eff..b06ae442f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jan 12 00:36:29 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * object.c (rb_class_superclass): superclass of singleton class also
+ should be a singleton class. fixed: [ruby-list:40519]
+
Tue Jan 11 09:44:40 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* numeric.c (Init_Numeric): turn off floating point exceptions
diff --git a/object.c b/object.c
index 251f2fce0..20f9148ca 100644
--- a/object.c
+++ b/object.c
@@ -1624,6 +1624,9 @@ rb_class_superclass(klass)
if (!super) {
rb_raise(rb_eTypeError, "uninitialized class");
}
+ if (FL_TEST(klass, FL_SINGLETON)) {
+ super = RBASIC(klass)->klass;
+ }
while (TYPE(super) == T_ICLASS) {
super = RCLASS(super)->super;
}