aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-03-03 02:32:45 +0900
committerKoichi Sasada <ko1@atdot.net>2020-03-03 02:44:02 +0900
commit91de0daaa239e9ceb40f1a69b04b373b71477b43 (patch)
treead4ed781e612ecaf5ae7d6f7440d1c2917366021 /vm_insnhelper.c
parent65dd50fc25f6522536d5c4749055384bde1f9371 (diff)
downloadruby-91de0daaa239e9ceb40f1a69b04b373b71477b43.tar.gz
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
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 87f785c124..e0169ed2ea 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -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 */