diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-06-04 23:11:38 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2019-06-04 23:17:18 +0900 |
commit | 0872ea53303499caf3584e40f2a5438e86eb4fed (patch) | |
tree | 5f855704bd7f6a7d8cfa182fc19821ec7ab5cfa8 /compile.c | |
parent | 39eae6bf89773ef830b632c02737545ab9eedd35 (diff) | |
download | ruby-0872ea53303499caf3584e40f2a5438e86eb4fed.tar.gz |
node.h: Avoid a magic number to represent excessed comma
`(ID)1` was assigned to NODE_ARGS#rest_arg for `{|x,| }`.
This change removes the magic number by introducing an explicit macro
variable for it: NODE_SPECIAL_EXCESSED_COMMA.
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1632,7 +1632,7 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *const optargs, const NODE *cons debugs(" - argc: %d\n", body->param.lead_num); rest_id = args->rest_arg; - if (rest_id == 1) { + if (rest_id == NODE_SPECIAL_EXCESSED_COMMA) { last_comma = 1; rest_id = 0; } |