From 4e3df65d6fbfdb434fea6635465cb33e17926185 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 12 Nov 2021 15:02:49 +0900 Subject: test/syntax.rb: test argument forwarding without parentheses. --- test/t/syntax.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') 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 -- cgit v1.2.3