summaryrefslogtreecommitdiff
path: root/test/ripper
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-05-21 15:34:23 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-05-21 18:28:24 +0900
commit050bb06e66d8c08c43bf0cc74271f35c3edce25d (patch)
tree5f709e8e60cf013f3a15d8cac2ba6efe93eadb83 /test/ripper
parente9974a466ac7edcb8035f5f7bc65c4c6731e2ee2 (diff)
ripper: assertions for rescue/ensure in method body
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4516
Diffstat (limited to 'test/ripper')
-rw-r--r--test/ripper/test_parser_events.rb2
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