diff options
author | Nobuhiro IMAI <[email protected]> | 2021-01-09 12:18:14 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-01-09 13:33:33 +0900 |
commit | 7ff0e93f96cc55467d791ebc841f12f9130bf181 (patch) | |
tree | 652c6f7f4c7e0439ede65ce17ac8b5c7c8bcfc6c /parse.y | |
parent | 1a3343cfdcb765b94bf63375d45618130d6b92c9 (diff) |
parse.y: handle "duplicated argument name" appropriately on ripper.y
refs: 733ed1e184
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -7871,7 +7871,9 @@ formal_argument(struct parser_params *p, ID lhs) formal_argument(struct parser_params *p, VALUE lhs) #endif { - switch (id_type(get_id(lhs))) { + ID id = get_id(lhs); + + switch (id_type(id)) { case ID_LOCAL: break; #ifndef RIPPER @@ -7896,7 +7898,7 @@ formal_argument(struct parser_params *p, VALUE lhs) return 0; #undef ERR } - shadowing_lvar(p, lhs); + shadowing_lvar(p, id); return lhs; } |