[前][次][番号順一覧][スレッド一覧]

ruby-changes:60267

From: Koichi <ko1@a...>
Date: Tue, 3 Mar 2020 02:44:36 +0900 (JST)
Subject: [ruby-changes:60267] 91de0daaa2 (master): method_missing_reason should be set.

https://git.ruby-lang.org/ruby.git/commit/?id=91de0daaa2

From 91de0daaa239e9ceb40f1a69b04b373b71477b43 Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Tue, 3 Mar 2020 02:32:45 +0900
Subject: 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

diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 87f785c..e0169ed 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 https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2696
 	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 */
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]