summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2023-03-17 16:00:34 +0900
committerKoichi Sasada <ko1@atdot.net>2023-03-23 14:03:12 +0900
commite5a5e43c36443e06756aba6de95c94b41b910a82 (patch)
treed6f558ef0e11eea7365a113638603adf4d24ace3 /compile.c
parentfee9044b255579228b60038d998abec0f75ca87f (diff)
downloadruby-e5a5e43c36443e06756aba6de95c94b41b910a82.tar.gz
should not restore builtin_inline_index
`builtin_inline_index` is restored because THEN clause on `Primitive.mandatory_only?` was compiled twice. However, f29c9d6d36 skips to compile THEN clause so we don't need to restore `builtin_inline_index`.
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index decac40936..e863924397 100644
--- a/compile.c
+++ b/compile.c
@@ -8348,15 +8348,12 @@ compile_builtin_mandatory_only_method(rb_iseq_t *iseq, const NODE *node, const N
.script_lines = ISEQ_BODY(iseq)->variable.script_lines,
};
- int prev_inline_index = GET_VM()->builtin_inline_index;
-
ISEQ_BODY(iseq)->mandatory_only_iseq =
rb_iseq_new_with_opt(&ast, rb_iseq_base_label(iseq),
rb_iseq_path(iseq), rb_iseq_realpath(iseq),
nd_line(line_node), NULL, 0,
ISEQ_TYPE_METHOD, ISEQ_COMPILE_DATA(iseq)->option);
- GET_VM()->builtin_inline_index = prev_inline_index;
ALLOCV_END(idtmp);
return COMPILE_OK;
}