diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-28 10:44:31 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-28 10:44:31 +0900 |
| commit | 1a44b8817b12f36ffa1392e71f5ed80f58eb7734 (patch) | |
| tree | 4f9b11d9f923406ce89d2cb690adb97ca90c30ff | |
| parent | 2e59cd43de2fd797a03f41879ab0430af3b25b5f (diff) | |
| parent | d97ab343bdc0856f9e5d6fab7258dc90345ab754 (diff) | |
| download | mruby-1a44b8817b12f36ffa1392e71f5ed80f58eb7734.tar.gz mruby-1a44b8817b12f36ffa1392e71f5ed80f58eb7734.zip | |
Merge pull request #2143 from mirichi/test
add post mandatory argument test
| -rw-r--r-- | test/t/bs_block.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/t/bs_block.rb b/test/t/bs_block.rb index 91de9141d..0a58741e3 100644 --- a/test/t/bs_block.rb +++ b/test/t/bs_block.rb @@ -487,3 +487,28 @@ assert("BS Block 35") do end assert_equal :ok, TestReturnFromNestedBlock_BSBlock35.test end + +assert('BS Block 36') do + def iter + yield 1, 2, 3, 4, 5 + end + + assert_equal([1, 2, [3, 4], 5]) do + iter{|a, b, *c, d| + [a, b, c, d] + } + end +end + +assert('BS Block 37') do + def iter + yield 1, 2, 3 + end + + assert_equal([1, 2, [], 3]) do + iter{|a, b, *c, d| + [a, b, c, d] + } + end +end + |
