mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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).
This commit is contained in:
parent
6052b12de4
commit
b42c8398ba
Notes:
git
2025-04-29 16:13:40 +00:00
2 changed files with 5 additions and 2 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;
|
||||
call_node->block == NULL &&
|
||||
(flags & VM_CALL_ARGS_BLOCKARG) == 0;
|
||||
|
||||
if (inline_new) {
|
||||
if (LAST_ELEMENT(ret) == opt_new_prelude) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue