summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorS-H-GAMELINKS <[email protected]>2024-02-01 19:50:40 +0900
committerKazuki Tsujimoto <[email protected]>2024-03-04 12:33:00 +0900
commit2d8788e90cd535933c0f444112d465cffc4c71b1 (patch)
treea1151ca0a92002f28db766c88b324c11faa091a3 /compile.c
parent5621d794a2fa9293d1da489d6b0ee0e7c73c9128 (diff)
Support NODE_ONCE for pattern matching
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index f1dd595e3d..1336982d32 100644
--- a/compile.c
+++ b/compile.c
@@ -7259,6 +7259,7 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
case NODE_COLON3:
case NODE_BEGIN:
case NODE_BLOCK:
+ case NODE_ONCE:
CHECK(COMPILE(ret, "case in literal", node)); // (1)
if (in_single_pattern) {
ADD_INSN1(ret, line_node, dupn, INT2FIX(2));