aboutsummaryrefslogtreecommitdiffstats
path: root/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'class.c')
-rw-r--r--class.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/class.c b/class.c
index f963f0c22a..991172acbb 100644
--- a/class.c
+++ b/class.c
@@ -703,7 +703,8 @@ rb_define_class_id_under(VALUE outer, ID id, VALUE super)
rb_raise(rb_eTypeError, "%"PRIsVALUE" is not a class", rb_id2str(id));
}
if (rb_class_real(RCLASS_SUPER(klass)) != super) {
- rb_name_error(id, "%"PRIsVALUE" is already defined", rb_id2str(id));
+ rb_raise(rb_eTypeError, "superclass mismatch for class %"PRIsVALUE"",
+ rb_id2str(id));
}
return klass;
}