test/syntax.rb: test argument forwarding without parentheses.

parent 7c187866
...@@ -730,10 +730,19 @@ assert('argument forwarding') do ...@@ -730,10 +730,19 @@ assert('argument forwarding') do
assert_equal(a,1) assert_equal(a,1)
a0(1,...) a0(1,...)
end end
def c ...
a(...)
end
def d a,...
assert_equal(a,1)
b(1,...)
end
} }
o = c.new o = c.new
o.a(1,2,3){} o.a(1,2,3){}
o.b(1,2,3){} o.b(1,2,3){}
o.c(1,2,3){}
o.d(1,2,3){}
end end
assert('endless def') do assert('endless def') do
......
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