Commit 1a44b881 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2143 from mirichi/test

add post mandatory argument test
parents 2e59cd43 d97ab343
......@@ -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