summaryrefslogtreecommitdiff
path: root/compile.c
diff options
authorJeremy Evans <code@jeremyevans.net>2024-04-04 19:32:30 -0700
committerJeremy Evans <code@jeremyevans.net>2024-04-06 10:33:16 -0700
commitad90fdd24c55284deab8c24449bfd1113658afdf (patch)
tree1f6993a8bbc5a0f3cb94b3dadb700cb8bc5bb42d /compile.c
parent0b4db711dd43ea437093428ea72a08a2a6ef9f88 (diff)
Remove compiler code to handle blocks in attrasgn
Passing blocks is no longer allowed in attrasgn. This is similar to 3a674c9c655288b3e12ac1cff149ba4af08fd452, but for attrasgn instead of op_asgn.
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/compile.c b/compile.c
index dfdbb8f644..d509957dac 100644
--- a/compile.c
+++ b/compile.c
@@ -9782,16 +9782,7 @@ compile_attrasgn(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node
ADD_SEQ(ret, recv);
ADD_SEQ(ret, args);
- if (flag & VM_CALL_ARGS_BLOCKARG) {
- ADD_INSN1(ret, node, topn, INT2FIX(1));
- if (flag & VM_CALL_ARGS_SPLAT) {
- ADD_INSN1(ret, node, putobject, INT2FIX(-1));
- ADD_SEND_WITH_FLAG(ret, node, idAREF, INT2FIX(1), INT2FIX(asgnflag));
- }
- ADD_INSN1(ret, node, setn, FIXNUM_INC(argc, 3));
- ADD_INSN (ret, node, pop);
- }
- else if (flag & VM_CALL_ARGS_SPLAT) {
+ if (flag & VM_CALL_ARGS_SPLAT) {
ADD_INSN(ret, node, dup);
ADD_INSN1(ret, node, putobject, INT2FIX(-1));
ADD_SEND_WITH_FLAG(ret, node, idAREF, INT2FIX(1), INT2FIX(asgnflag));
close