vm.c (prepare_missing): add receiver's class in superclass calls

This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-11-13 22:23:04 +09:00
parent 65e0e5bbd3
commit a109599d53
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -615,7 +615,7 @@ prepare_missing(mrb_state *mrb, mrb_callinfo *ci, mrb_value recv, mrb_sym mid, m
if (mrb_func_basic_p(mrb, recv, missing, mrb_obj_missing)) {
method_missing:
if (super) mrb_no_method_error(mrb, mid, args, "no superclass method '%n'", mid);
if (super) mrb_no_method_error(mrb, mid, args, "no superclass method '%n' for %T", mid, recv);
else mrb_method_missing(mrb, mid, recv, args);
/* not reached */
}
+1 -1
View File
@@ -346,7 +346,7 @@ assert('Kernel#method_missing', '15.3.1.3.30') do
end
end
no_super_test = NoSuperMethodTestClass.new
msg = "no superclass method 'no_super_method_named_this'"
msg = "no superclass method 'no_super_method_named_this' for NoSuperMethodTestClass"
assert_raise_with_message(NoMethodError, msg) do
no_super_test.no_super_method_named_this
end