summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2024-05-08 13:04:33 -0400
committergit <svn-admin@ruby-lang.org>2024-05-08 17:30:18 +0000
commit2d631cf428a4bc76c0d75b5af841efd61d92aeee (patch)
treebd348faa1ba1414a61e52c935f6e40a58103b4c4
parent61829eec657e8271f05a74f2067b4203ba0a51a2 (diff)
[ruby/prism] Fix line number of unreachable statement warning
https://github.com/ruby/prism/commit/62f6b1f2e2
-rw-r--r--prism/prism.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/prism/prism.c b/prism/prism.c
index 6ae32825eb..05123ac570 100644
--- a/prism/prism.c
+++ b/prism/prism.c
@@ -6946,7 +6946,7 @@ pm_statements_node_body_append(pm_parser_t *parser, pm_statements_node_t *node,
case PM_REDO_NODE:
case PM_RETRY_NODE:
case PM_RETURN_NODE:
- pm_parser_warn_node(parser, previous, PM_WARN_UNREACHABLE_STATEMENT);
+ pm_parser_warn_node(parser, statement, PM_WARN_UNREACHABLE_STATEMENT);
break;
default:
break;