aboutsummaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
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 308e1dc8d7..13f16b1c80 100644
--- a/object.c
+++ b/object.c
@@ -1587,6 +1587,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;
}