зеркало из https://github.com/github/ruby.git
[PRISM] Add splatkw to super calls when necessary
This commit is contained in:
Родитель
d96b4586e4
Коммит
a7b47f96f3
|
@ -7430,7 +7430,6 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
|
|||
PM_PUTSELF;
|
||||
|
||||
int argc = pm_setup_args(super_node->arguments, &flags, &keywords, iseq, ret, popped, scope_node, dummy_line_node, parser);
|
||||
|
||||
flags |= VM_CALL_SUPER | VM_CALL_FCALL;
|
||||
|
||||
if (super_node->block) {
|
||||
|
@ -7453,6 +7452,10 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
|
|||
}
|
||||
}
|
||||
|
||||
if ((flags & VM_CALL_ARGS_BLOCKARG) && (flags & VM_CALL_KW_SPLAT) && !(flags & VM_CALL_KW_SPLAT_MUT)) {
|
||||
ADD_INSN(args, &dummy_line_node, splatkw);
|
||||
}
|
||||
|
||||
ADD_SEQ(ret, args);
|
||||
ADD_INSN2(ret, &dummy_line_node, invokesuper,
|
||||
new_callinfo(iseq, 0, argc, flags, keywords, parent_block != NULL),
|
||||
|
|
Загрузка…
Ссылка в новой задаче