aboutsummaryrefslogtreecommitdiffstats
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 97419b03d6..3bcad9fea7 100644
--- a/object.c
+++ b/object.c
@@ -1519,7 +1519,7 @@ rb_class_inherited_p(VALUE mod, VALUE arg)
VALUE start = mod;
if (mod == arg) return Qtrue;
- if (!CLASS_OR_MODULE_P(arg)) {
+ if (!CLASS_OR_MODULE_P(arg) && !RB_TYPE_P(arg, T_ICLASS)) {
rb_raise(rb_eTypeError, "compared with non class/module");
}
arg = RCLASS_ORIGIN(arg);