ripper: assertions for rescue/ensure in method body

This commit is contained in:
Nobuyoshi Nakada 2021-05-21 15:34:23 +09:00
Родитель e9974a466a
Коммит 050bb06e66
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -660,6 +660,8 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
}
assert_equal true, thru_def
assert_equal '[def(foo,[],bodystmt([void()]))]', parse('def foo ;end')
assert_equal '[def(foo,[],bodystmt([void()],rescue(,,[void()])))]', parse('def foo ;rescue; end')
assert_equal '[def(foo,[],bodystmt([void()],,,ensure([void()])))]', parse('def foo ;ensure; end')
end
def test_endless_def