зеркало из https://github.com/github/ruby.git
ripper: assertions for rescue/ensure in method body
This commit is contained in:
Родитель
e9974a466a
Коммит
050bb06e66
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче