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:
Nobuyoshi Nakada
2014-04-21 07:00:03 +09:00
parent a3d6290d7b
commit 9eaddfab44
2 changed files with 13 additions and 0 deletions
+7
View File
@@ -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