mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 23:16:42 +02:00
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:
parent
e5a30879f9
commit
9c5d90b516
2 changed files with 22 additions and 19 deletions
|
@ -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")}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue