mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
vm.c (prepare_missing): add receiver's class in superclass calls
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user