Skip to content

Commit

Permalink
super class error formats the superclass by inspect; rerf #3515
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Mar 19, 2017
1 parent ef105b5 commit 527dcd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ mrb_vm_define_class(mrb_state *mrb, mrb_value outer, mrb_value super, mrb_sym id

if (!mrb_nil_p(super)) {
if (mrb_type(super) != MRB_TT_CLASS) {
mrb_raisef(mrb, E_TYPE_ERROR, "superclass must be a Class (%S given)", super);
mrb_raisef(mrb, E_TYPE_ERROR, "superclass must be a Class (%S given)",
mrb_inspect(mrb, super));
}
s = mrb_class_ptr(super);
}
Expand Down

0 comments on commit 527dcd5

Please sign in to comment.