diff options
| author | Nobuyoshi Nakada <[email protected]> | 2014-04-21 07:00:03 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <[email protected]> | 2014-04-21 07:00:57 +0900 |
| commit | 9eaddfab4455513ef6f3dbb89eca80a7798bb49a (patch) | |
| tree | 11dd45ca298a6862432d443be6fadbe55b31e491 /test/t/syntax.rb | |
| parent | a3d6290d7b3302fbd602eb57e4569ba0afa7b8f2 (diff) | |
| download | mruby-9eaddfab4455513ef6f3dbb89eca80a7798bb49a.tar.gz mruby-9eaddfab4455513ef6f3dbb89eca80a7798bb49a.zip | |
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
Diffstat (limited to 'test/t/syntax.rb')
| -rw-r--r-- | test/t/syntax.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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 |
