mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
allow method definition in cmdarg
save cmdarg_stack and isolate command argument state from outer scope to allow method definition in cmdarg import from ruby/ruby@04bb9d6b75
This commit is contained in:
@@ -265,3 +265,10 @@ assert('parenthesed do-block in cmdarg') do
|
||||
result = x.test (proc do :ok; end)
|
||||
assert_equal :ok, result
|
||||
end
|
||||
|
||||
assert('method definition in cmdarg') do
|
||||
if false
|
||||
bar def foo; self.each do end end
|
||||
end
|
||||
true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user