summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <spiketeika@gmail.com>2024-06-25 11:38:06 +0900
committerYuichiro Kaneko <spiketeika@gmail.com>2024-06-26 07:48:43 +0900
commit4fb7e1b6d0160322b3cbcdd67c544f2e9ff56bed (patch)
tree50572608859771f302a505cbef207d3e183ca613 /parse.y
parenta47c152ab50900a9164d67612ad2b321a2668c3a (diff)
Change `enum rb_parser_ary_data_type` default value to 1 for easy debug
We face `[BUG] unexpected rb_parser_ary_data_type (0) for script lines` on master branch recently. This commit changes `enum rb_parser_ary_data_type` to start with `1` and `0` to be invalid then it makes clear `rb_parser_ary_data_type (0)` is not intentional.
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index ac631e9068..ec4a4ac6a8 100644
--- a/parse.y
+++ b/parse.y
@@ -2512,6 +2512,7 @@ parser_ary_new_capa(rb_parser_t *p, long len)
rb_bug("negative array size (or size too big): %ld", len);
}
rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
+ ary->data_type = 0;
ary->len = 0;
ary->capa = len;
if (0 < len) {