Use only CMDARG/COND _PUSH/POP for cmdarg/cond management.

From: Ilya Bylich <ibylich@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-03-29 03:42:32 +00:00
parent e5a30879f9
commit 9c5d90b516
2 changed files with 22 additions and 19 deletions

View file

@ -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")}}