aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-12-13 05:55:18 +0900
committerKoichi Sasada <ko1@atdot.net>2020-12-14 11:57:46 +0900
commit967040ba59799e6b7891168ffbf37cc646988d84 (patch)
tree2f36f519d5c753ccd68dc08c8e6c65ea375ffcc6 /thread.c
parentfa63052be19b26d39b22689ad9969aa83909809e (diff)
downloadruby-967040ba59799e6b7891168ffbf37cc646988d84.tar.gz
Introduce negative method cache
pCMC doesn't have negative method cache so this patch implements it.
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index e910615b84..e60d71f75a 100644
--- a/thread.c
+++ b/thread.c
@@ -5671,6 +5671,8 @@ rb_resolve_me_location(const rb_method_entry_t *me, VALUE resolved_location[5])
{
VALUE path, beg_pos_lineno, beg_pos_column, end_pos_lineno, end_pos_column;
+ if (!me->def) return NULL; // negative cme
+
retry:
switch (me->def->type) {
case VM_METHOD_TYPE_ISEQ: {