From 050bb06e66d8c08c43bf0cc74271f35c3edce25d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 21 May 2021 15:34:23 +0900 Subject: ripper: assertions for rescue/ensure in method body --- test/ripper/test_parser_events.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ripper') 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 -- cgit v1.2.3