summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ast.c b/ast.c
index ba2f0eaa00..b98fba6fab 100644
--- a/ast.c
+++ b/ast.c
@@ -787,7 +787,6 @@ node_locations(VALUE ast_value, const NODE *node)
return rb_ary_new_from_args(2,
location_new(nd_code_loc(node)),
location_new(&RNODE_BLOCK_PASS(node)->operator_loc));
-
case NODE_BREAK:
return rb_ary_new_from_args(2,
location_new(nd_code_loc(node)),
@@ -807,6 +806,12 @@ node_locations(VALUE ast_value, const NODE *node)
location_new(nd_code_loc(node)),
location_new(&RNODE_CASE3(node)->case_keyword_loc),
location_new(&RNODE_CASE3(node)->end_keyword_loc));
+ case NODE_CLASS:
+ return rb_ary_new_from_args(4,
+ location_new(nd_code_loc(node)),
+ location_new(&RNODE_CLASS(node)->class_keyword_loc),
+ location_new(&RNODE_CLASS(node)->inheritance_operator_loc),
+ location_new(&RNODE_CLASS(node)->end_keyword_loc));
case NODE_DOT2:
return rb_ary_new_from_args(2,
location_new(nd_code_loc(node)),