Actions
Misc #11131
closedUnexpected splatting of empty kwargs
Status:
Closed
Assignee:
-
Description
def foo(); :ok end
foo(*[]) #=> :ok
foo(**{}) #=> ArgumentError: wrong number of arguments (1 for 0)
foo(*[], **{}) #=> ArgumentError: wrong number of arguments (1 for 0)
I was expecting kwargs splatting to work the same as args splatting and be ignored when an empty container is passed.
Actions
Like0
Like0Like0Like0