From ce9beb9d20187c861462282460b998684759e5e7 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Sat, 18 Jul 2020 08:18:39 -0700 Subject: Improve error message when subclassing non-Class Fixes [Bug #14726] --- vm_insnhelper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 74e992a500..2fa96373b6 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -4068,7 +4068,7 @@ vm_define_class(ID id, rb_num_t flags, VALUE cbase, VALUE super) if (VM_DEFINECLASS_HAS_SUPERCLASS_P(flags) && !RB_TYPE_P(super, T_CLASS)) { rb_raise(rb_eTypeError, - "superclass must be a Class (%"PRIsVALUE" given)", + "superclass must be an instance of Class (given an instance of %"PRIsVALUE")", rb_obj_class(super)); } -- cgit v1.2.3