aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2023-08-01 16:51:36 +0900
committerKoichi Sasada <ko1@atdot.net>2023-08-01 18:06:25 +0900
commit6a5c548218035bfdaf226c7ab1d0af37c9480900 (patch)
treecc6a029c549a82f4d4041145a0290236981a3932 /parse.y
parent0622c78869b0e9381bd709e2330b7e24feb1fb46 (diff)
downloadruby-6a5c548218035bfdaf226c7ab1d0af37c9480900.tar.gz
remove strange line event
```ruby def helper_cant_rescue begin raise SyntaxError rescue cant_rescue # here end end ``` on this case, a line event is reported on `cant_rescue` line because of node structure. it should not be reported.
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 80b9887095..dd5e664c68 100644
--- a/parse.y
+++ b/parse.y
@@ -12360,6 +12360,7 @@ reduce_nodes(struct parser_params *p, NODE **body)
if (!subnodes(nd_head, nd_resq)) goto end;
break;
case NODE_RESCUE:
+ newline = 0; // RESBODY should not be a NEWLINE
if (node->nd_else) {
body = &node->nd_resq;
break;