diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb index 014403a784..413381ed1f 100644 --- a/test/ripper/test_parser_events.rb +++ b/test/ripper/test_parser_events.rb @@ -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