summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2020-07-18 15:18:39 (GMT)
committerJeremy Evans <code@jeremyevans.net>2020-11-13 15:06:13 (GMT)
commitce9beb9d20187c861462282460b998684759e5e7 (patch)
treecb20c96125ee71ee3335bf15a8feefd370074d31 /class.c
parent6d05967468ea58ba481259718f07b3cb5a386945 (diff)
Improve error message when subclassing non-Class
Fixes [Bug #14726]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3330
Diffstat (limited to 'class.c')
-rw-r--r--class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/class.c b/class.c
index 4b8130d..7cc087f 100644
--- a/class.c
+++ b/class.c
@@ -227,7 +227,7 @@ void
rb_check_inheritable(VALUE super)
{
if (!RB_TYPE_P(super, T_CLASS)) {
- rb_raise(rb_eTypeError, "superclass must be a Class (%"PRIsVALUE" given)",
+ rb_raise(rb_eTypeError, "superclass must be an instance of Class (given an instance of %"PRIsVALUE")",
rb_obj_class(super));
}
if (RBASIC(super)->flags & FL_SINGLETON) {