def method(a, b='a', c, *d)
[a,b,c, d]
end
p method(1,2,3,4)
doesn't work, I don't understand why, if we remove the b parameter all works well. The syntax rules say that you can put params with default values before the splat parameter.
def method(a, b='a', c, *d)
[a,b,c, d]
end
p method(1,2,3,4)
doesn't work, I don't understand why, if we remove the b parameter all works well. The syntax rules say that you can put params with default values before the splat parameter.