[前][次][番号順一覧][スレッド一覧]

ruby-changes:66289

From: Nobuyoshi <ko1@a...>
Date: Fri, 21 May 2021 18:28:38 +0900 (JST)
Subject: [ruby-changes:66289] 050bb06e66 (master): ripper: assertions for rescue/ensure in method body

https://git.ruby-lang.org/ruby.git/commit/?id=050bb06e66

From 050bb06e66d8c08c43bf0cc74271f35c3edce25d Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
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(+)

diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index 014403a..413381e 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 https://github.com/ruby/ruby/blob/trunk/test/ripper/test_parser_events.rb#L660
     }
     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.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]