diff options
| author | mirichi <[email protected]> | 2014-04-28 09:37:45 +0900 |
|---|---|---|
| committer | mirichi <[email protected]> | 2014-04-28 09:37:45 +0900 |
| commit | d97ab343bdc0856f9e5d6fab7258dc90345ab754 (patch) | |
| tree | 7fe879fd82f840b75135004722481133bf87dd8c | |
| parent | 67fed3d7fb60aeddd0c23e808aefb389c28a32a1 (diff) | |
| download | mruby-d97ab343bdc0856f9e5d6fab7258dc90345ab754.tar.gz mruby-d97ab343bdc0856f9e5d6fab7258dc90345ab754.zip | |
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 + |
