summaryrefslogtreecommitdiff
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 7a4b1e208c..f77d3edc1d 100644
--- a/object.c
+++ b/object.c
@@ -75,6 +75,9 @@ VALUE
rb_class_real(cl)
VALUE cl;
{
+ if (TYPE(cl) == T_ICLASS) {
+ cl = RBASIC(cl)->klass;
+ }
while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
cl = RCLASS(cl)->super;
}