Commit d97ab343 authored by mirichi's avatar mirichi

add post mandatory argument test

parent 67fed3d7
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment