summaryrefslogtreecommitdiffhomepage
path: root/test/t
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-11-12 15:02:49 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-11-12 15:02:49 +0900
commit4e3df65d6fbfdb434fea6635465cb33e17926185 (patch)
tree8c448cc095348ed535888964529c0abfe3a7d89e /test/t
parent7c1878669a3efe02e3a0c530805d553e7f7cf1ea (diff)
downloadmruby-4e3df65d6fbfdb434fea6635465cb33e17926185.tar.gz
mruby-4e3df65d6fbfdb434fea6635465cb33e17926185.zip
test/syntax.rb: test argument forwarding without parentheses.
Diffstat (limited to 'test/t')
-rw-r--r--test/t/syntax.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/t/syntax.rb b/test/t/syntax.rb
index a89432b68..87edfb271 100644
--- a/test/t/syntax.rb
+++ b/test/t/syntax.rb
@@ -730,10 +730,19 @@ assert('argument forwarding') do
assert_equal(a,1)
a0(1,...)
end
+ def c ...
+ a(...)
+ end
+ def d a,...
+ assert_equal(a,1)
+ b(1,...)
+ end
}
o = c.new
o.a(1,2,3){}
o.b(1,2,3){}
+ o.c(1,2,3){}
+ o.d(1,2,3){}
end
assert('endless def') do