summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index 18c011c3e5..1ba155cbfa 100644
--- a/object.c
+++ b/object.c
@@ -81,7 +81,7 @@ obj_type(obj)
{
VALUE cl = CLASS_OF(obj);
- if (FL_TEST(cl, FL_SINGLETON)) {
+ while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
cl = RCLASS(cl)->super;
}
return cl;