summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorydah <[email protected]>2024-09-03 17:53:55 +0900
committerYuichiro Kaneko <[email protected]>2024-09-03 21:15:12 +0900
commitaf143d8a749ae0ba0f394521dd46bea824a354fa (patch)
treed27074dc71ff379dde01cf6ed9992d1168bc0dff /ast.c
parentb7fa2dd0d0b7328f8f713b7cf0332d1e34c20fe4 (diff)
Implement UNDEF NODE keyword locations
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11523
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ast.c b/ast.c
index 338ab00819..fd6a6dea89 100644
--- a/ast.c
+++ b/ast.c
@@ -775,6 +775,10 @@ node_locations(VALUE ast_value, const NODE *node)
{
enum node_type type = nd_type(node);
switch (type) {
+ case NODE_UNDEF:
+ return rb_ary_new_from_args(2,
+ location_new(nd_code_loc(node)),
+ location_new(&RNODE_UNDEF(node)->keyword_loc));
case NODE_UNLESS:
return rb_ary_new_from_args(4,
location_new(nd_code_loc(node)),