Optional argument after splat argument

You cannot have optional parameters after a splat.

The splat means “use up all of the remaining arguments” but then you provide an optional argument, so how could the interpreter know if the last argument is part of the “numbers” splat or the optional “options”?

Leave a Comment