summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authormirichi <[email protected]>2014-04-28 13:49:50 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-06-04 22:25:33 +0900
commita997e41d173cca1054849608ada0a463724c2409 (patch)
tree9abcfaa694531e68e9f5bfec54d105342aa60a10 /test
parent45dd6b140adab22d6a0b94ae8d62c40f44cd0abe (diff)
downloadmruby-a997e41d173cca1054849608ada0a463724c2409.tar.gz
mruby-a997e41d173cca1054849608ada0a463724c2409.zip
add block argument test #2144
Diffstat (limited to 'test')
-rw-r--r--test/t/bs_block.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/t/bs_block.rb b/test/t/bs_block.rb
index 995e52559..f4e4da375 100644
--- a/test/t/bs_block.rb
+++ b/test/t/bs_block.rb
@@ -520,3 +520,15 @@ assert('BS Block 38') do
assert_equal [1,2,3,4,5], iter{|a,b,c=:c,d,e| [a,b,c,d,e]}
end
+
+assert('BS Block 39') do
+ def iter
+ yield 1
+ end
+
+ assert_equal([1, 2, nil]) do
+ iter{|a, b=2, c|
+ [a, b, c]
+ }
+ end
+end