diff options
| author | NARUSE, Yui <naruse@airemix.jp> | 2024-01-30 18:57:00 +0900 |
|---|---|---|
| committer | NARUSE, Yui <naruse@airemix.jp> | 2024-01-30 18:57:00 +0900 |
| commit | f8f0d342e48a38caac6d32b438c145bb581a51e6 (patch) | |
| tree | 0add7965139c08aa4d19bc9bb2b948c664fde984 | |
| parent | 9f18cbd7964f32f224e7d0efba79ee0476a442e0 (diff) | |
merge revision(s) 3d19409637de1462b6790d2a92344bf0a10d8c52: [Backport #20090]
Use index for referring to symbols in `args` rule instead of named
references
In `args: args ',' arg_splat`, `args` is not unique name.
Currently the associated rule is interpreted as
`$$ = rest_arg_append(p, $$, $3, &@$);`.
The action works as expected because `$$` is initialized with
`$1` before each action is executed.
However it's misleading then change to use index.
---
parse.y | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
| -rw-r--r-- | parse.y | 4 | ||||
| -rw-r--r-- | version.h | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -3800,9 +3800,9 @@ args : arg_value | args ',' arg_splat { /*%%%*/ - $$ = rest_arg_append(p, $args, $arg_splat, &@$); + $$ = rest_arg_append(p, $1, $3, &@$); /*% %*/ - /*% ripper: args_add_star!($args, $arg_splat) %*/ + /*% ripper: args_add_star!($1, $3) %*/ } ; @@ -11,7 +11,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 2 +#define RUBY_PATCHLEVEL 3 #include "ruby/version.h" #include "ruby/internal/abi.h" |
