diff options
| author | Haldun Bayhantopcu <haldun@github.com> | 2024-01-24 00:57:41 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-01-26 18:35:54 +0000 |
| commit | 7d356b8f0e5be81075a30e779c872eeed9049150 (patch) | |
| tree | 56ec80399d752a187524ac3a1c01a97a6bc6b4f9 /prism | |
| parent | 9a7637da2d0fd6a43e980bb210957011c6f146be (diff) | |
[ruby/prism] Fix multiple assigns with newlines
https://github.com/ruby/prism/commit/b4ba41bdcd
Diffstat (limited to 'prism')
| -rw-r--r-- | prism/prism.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/prism/prism.c b/prism/prism.c index f0091d7e23..6d7beaf88f 100644 --- a/prism/prism.c +++ b/prism/prism.c @@ -11144,6 +11144,8 @@ static pm_node_t * parse_targets_validate(pm_parser_t *parser, pm_node_t *first_target, pm_binding_power_t binding_power) { pm_node_t *result = parse_targets(parser, first_target, binding_power); + while (accept1(parser, PM_TOKEN_NEWLINE)); + // Ensure that we have either an = or a ) after the targets. if (!match2(parser, PM_TOKEN_EQUAL, PM_TOKEN_PARENTHESIS_RIGHT)) { pm_parser_err_node(parser, result, PM_ERR_WRITE_TARGET_UNEXPECTED); |
