summaryrefslogtreecommitdiff
path: root/object.c
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
commit480d6b8afc0e03bb291c91541295f253c0289aef (patch)
tree261a79eade48bdd75cf381e749e18bd8ee372a57 /object.c
parent712a9f3729e9bd38b0e62b63b00830e7a80cfc3c (diff)
* object.c (rb_class_superclass): superclass of singleton class also
should be a singleton class. fixed: [ruby-list:40519] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/object.c b/object.c
index 251f2fc..20f9148 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;
}