From 9c5d90b516e665294fa673ca6d9819d7406a7629 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 29 Mar 2018 03:42:32 +0000 Subject: Use only CMDARG/COND _PUSH/POP for cmdarg/cond management. From: Ilya Bylich git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_parse.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 6eef3e9ae0..7229d0acb5 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -1149,6 +1149,14 @@ x = __ENCODING__ end end + def test_command_def_cmdarg + assert_valid_syntax("\n#{<<~"begin;"}\n#{<<~'end;'}") + begin; + m def x(); end + 1.tap do end + end; + end + =begin def test_past_scope_variable assert_warning(/past scope/) {catch {|tag| eval("BEGIN{throw tag}; tap {a = 1}; a")}} -- cgit v1.2.3