summaryrefslogtreecommitdiff
path: root/prism_compile.c
diff options
context:
space:
mode:
authorMax Bernstein <[email protected]>2025-04-28 14:54:39 -0400
committerAaron Patterson <[email protected]>2025-04-29 09:13:25 -0700
commitb42c8398ba84437cd6e96cbf6ccaf5ac5eff32b6 ()
treea4b50fdaa42e9dca1e11e4f6fb90a021683df660 /prism_compile.c
parent6052b12de484eb675fd3cdb6c6ff32a3e1b90b72 (diff)
Don't support blockarg in opt_new
We don't calculate the correct argc so the bookkeeping slot is something else (unexpected) instead of Qnil (expected).
Notes: Merged: https://.com/ruby/ruby/pull/13198
-rw-r--r--prism_compile.c3
1 files changed, 2 insertions, 1 deletions
@@ -3722,7 +3722,8 @@ pm_compile_call(rb_iseq_t *iseq, const pm_call_node_t *call_node, LINK_ANCHOR *c
bool inline_new = ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction &&
method_id == rb_intern("new") &&
- call_node->block == NULL;
if (inline_new) {
if (LAST_ELEMENT(ret) == opt_new_prelude) {