diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-05-21 15:34:23 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-05-21 18:28:24 +0900 |
commit | 050bb06e66d8c08c43bf0cc74271f35c3edce25d (patch) | |
tree | 5f709e8e60cf013f3a15d8cac2ba6efe93eadb83 /test/ripper/test_parser_events.rb | |
parent | e9974a466ac7edcb8035f5f7bc65c4c6731e2ee2 (diff) | |
download | ruby-050bb06e66d8c08c43bf0cc74271f35c3edce25d.tar.gz |
ripper: assertions for rescue/ensure in method body
Diffstat (limited to 'test/ripper/test_parser_events.rb')
-rw-r--r-- | test/ripper/test_parser_events.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 |