From 9eaddfab4455513ef6f3dbb89eca80a7798bb49a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 21 Apr 2014 07:00:03 +0900 Subject: 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@04bb9d6b75a55d4000700769eead5a5cb942c25b --- test/t/syntax.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/t/syntax.rb') diff --git a/test/t/syntax.rb b/test/t/syntax.rb index d761b1991..2adfbc8ab 100644 --- a/test/t/syntax.rb +++ b/test/t/syntax.rb @@ -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 -- cgit v1.2.3