add post mandatory argument test

This commit is contained in:
mirichi
2014-04-28 09:37:45 +09:00
parent 67fed3d7fb
commit d97ab343bd
+25
View File
@@ -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