[前][次][番号順一覧][スレッド一覧]

ruby-changes:62583

From: wanabe <ko1@a...>
Date: Sun, 16 Aug 2020 18:39:35 +0900 (JST)
Subject: [ruby-changes:62583] 2bbb7c3d1f (master): Adjust sp for `case ... in pat => var ... end`

https://git.ruby-lang.org/ruby.git/commit/?id=2bbb7c3d1f

From 2bbb7c3d1f2dc001354f6d58bf27c7796ea5f17e Mon Sep 17 00:00:00 2001
From: wanabe <s.wanabe@g...>
Date: Sat, 8 Aug 2020 21:48:35 +0900
Subject: Adjust sp for `case ... in pat => var ... end`


diff --git a/compile.c b/compile.c
index beb7823..1303a10 100644
--- a/compile.c
+++ b/compile.c
@@ -6212,6 +6212,7 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c https://github.com/ruby/ruby/blob/trunk/compile.c#L6212
         ADD_INSN(ret, line, dup);
         CHECK(iseq_compile_pattern_match(iseq, ret, n->nd_head, match_failed, in_alt_pattern, deconstructed_pos ? deconstructed_pos + 1 : FALSE));
         CHECK(iseq_compile_pattern_each(iseq, ret, n->nd_next->nd_head, matched, match_failed, in_alt_pattern, FALSE));
+        ADD_INSN(ret, line, putnil);
 
         ADD_LABEL(ret, match_failed);
         ADD_INSN(ret, line, pop);
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]