diff options
| author | Jeremy Evans <code@jeremyevans.net> | 2024-05-31 08:22:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-31 08:22:40 -0700 |
| commit | 89486c79bb59216dbbbdff69a2c81cb387f64c5f (patch) | |
| tree | 652773343005d1b40cf3a28f015d3d1a25c735d0 /parse.y | |
| parent | 8e2a6435e4f80f3c84cb7d8ac6d7a059d5969e1b (diff) | |
Make error messages clear blocks/keywords are disallowed in index assignment
Blocks and keywords are allowed in regular index.
Also update NEWS to make this more clear.
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -13658,10 +13658,10 @@ aryset_check(struct parser_params *p, NODE *args) } } if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) { - yyerror1(&kwds->nd_loc, "keyword arg given in index"); + yyerror1(&kwds->nd_loc, "keyword arg given in index assignment"); } if (block) { - yyerror1(&block->nd_loc, "block arg given in index"); + yyerror1(&block->nd_loc, "block arg given in index assignment"); } } |
