summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormirichi <[email protected]>2014-04-28 09:37:45 +0900
committermirichi <[email protected]>2014-04-28 09:37:45 +0900
commitd97ab343bdc0856f9e5d6fab7258dc90345ab754 (patch)
tree7fe879fd82f840b75135004722481133bf87dd8c
parent67fed3d7fb60aeddd0c23e808aefb389c28a32a1 (diff)
downloadmruby-d97ab343bdc0856f9e5d6fab7258dc90345ab754.tar.gz
mruby-d97ab343bdc0856f9e5d6fab7258dc90345ab754.zip
add post mandatory argument test
-rw-r--r--test/t/bs_block.rb25
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
+