diff options
author | ydah <[email protected]> | 2024-09-22 00:17:52 +0900 |
---|---|---|
committer | Yuichiro Kaneko <[email protected]> | 2024-09-23 09:19:37 +0900 |
commit | 5334766bebcb471549b300c6e6e9cf0d08575116 (patch) | |
tree | c2d6a727c50f22bcff51dc7fa34953a3f19ca15d /test | |
parent | feac2b4b77b337a637d80793c53b680e5697cab6 (diff) |
Implement CASE2 NODE keyword locations
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11661
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_ast.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb index 068b372ff9..f2024b2900 100644 --- a/test/ruby/test_ast.rb +++ b/test/ruby/test_ast.rb @@ -1358,6 +1358,11 @@ dummy assert_locations(node.children[-1].locations, [[1, 0, 1, 19], [1, 0, 1, 4], [1, 16, 1, 19]]) end + def test_case2_locations + node = ast_parse("case; when 1; end") + assert_locations(node.children[-1].locations, [[1, 0, 1, 17], [1, 0, 1, 4], [1, 14, 1, 17]]) + end + def test_next_locations node = ast_parse("loop { next 1 }") assert_locations(node.children[-1].children[-1].children[-1].locations, [[1, 7, 1, 13], [1, 7, 1, 11]]) |