summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorydah <[email protected]>2024-09-11 16:17:15 +0900
committerYuichiro Kaneko <[email protected]>2024-09-25 09:06:42 +0900
commit31a88d1554550a7c70fd63991051890c4fd71ac7 (patch)
treec89114916dfefb020753a1c17f8386c2ece16a82 /ast.c
parent6b46060fc29055b1e1d38da83959f4f2c98edfb1 (diff)
Implement RETURN NODE keyword locations
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11589
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 ae28db4414..a3490823ae 100644
--- a/ast.c
+++ b/ast.c
@@ -814,6 +814,10 @@ node_locations(VALUE ast_value, const NODE *node)
return rb_ary_new_from_args(2,
location_new(nd_code_loc(node)),
location_new(&RNODE_REDO(node)->keyword_loc));
+ case NODE_RETURN:
+ return rb_ary_new_from_args(2,
+ location_new(nd_code_loc(node)),
+ location_new(&RNODE_RETURN(node)->keyword_loc));
case NODE_UNDEF:
return rb_ary_new_from_args(2,
location_new(nd_code_loc(node)),