diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-08-26 00:51:39 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-08-26 02:08:53 +0900 |
commit | 40efbc7e406699a7a5c56802233d6748bf30805b (patch) | |
tree | 94c25cdf4564f06a9c7479403f50f7d394719b7a /parse.y | |
parent | 61c5c2f1c81b926beb20870615af5a738eb250bd (diff) |
[Bug #19851] Ripper: Hide internal block argument ID
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8293
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1145,6 +1145,11 @@ static void numparam_pop(struct parser_params *p, NODE *prev_inner); #define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */ #define idFWD_BLOCK '&' #define idFWD_ALL idDot3 +#ifdef RIPPER +#define arg_FWD_BLOCK Qnone +#else +#define arg_FWD_BLOCK idFWD_BLOCK +#endif #define FORWARD_ARGS_WITH_RUBY2_KEYWORDS #define RE_OPTION_ONCE (1<<16) @@ -5628,7 +5633,7 @@ args_tail : f_kwarg ',' f_kwrest opt_f_block_arg | args_forward { add_forwarding_args(p); - $$ = new_args_tail(p, Qnone, $1, ID2VAL(idFWD_BLOCK), &@1); + $$ = new_args_tail(p, Qnone, $1, arg_FWD_BLOCK, &@1); /*%%%*/ ($$->nd_ainfo)->forwarding = 1; /*% %*/ |