Skip to content

Commit 964e57b

Browse files
authored
Merge pull request #3810 from ruby/arguments-end
2 parents 583fa95 + 65595d6 commit 964e57b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/prism.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,10 @@ pm_arguments_node_arguments_append(pm_arguments_node_t *node, pm_node_t *argumen
20752075
node->base.location.start = argument->location.start;
20762076
}
20772077

2078-
node->base.location.end = argument->location.end;
2078+
if (node->base.location.end < argument->location.end) {
2079+
node->base.location.end = argument->location.end;
2080+
}
2081+
20792082
pm_node_list_append(&node->arguments, argument);
20802083

20812084
if (PM_NODE_TYPE_P(argument, PM_SPLAT_NODE)) {

0 commit comments

Comments
 (0)