1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

method_missing_reason should be set.

send() has special method launcher in VM and it has special
method_missing caller. This path doesn't set
ec->method_missing_reason which is used at exception creation,
so setup this information. Without this setting, NoMethodError
exception becomes NameError.

This patch will fix:
http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/2761643
This commit is contained in:
Koichi Sasada 2020-03-03 02:32:45 +09:00
parent 65dd50fc25
commit 91de0daaa2

View file

@ -2696,6 +2696,7 @@ vm_call_opt_send(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct
TOPN(i) = rb_str_intern(sym);
mid = idMethodMissing;
missing_reason = ci_missing_reason(orig_cd->ci);
ec->method_missing_reason = missing_reason;
}
else {
/* shift arguments */