According to this post, it is possible to have an optional key word argument after a splat argument. This works if the splat argument is introducing an array of arrays, but not when it is an array of hashes
For example if the method being called is defined as
def call(*scores, alpha: nil)
puts scores
end
then this works
scores = [[1,2],[3,4]]
call(*scores)
but this does not
scores = [ {a: 1}, {b: 3}]
call(*scores)
giving the following (with ruby 2.4.4)
ArgumentError: unknown keyword: b
but this works
scores = [ {a: 1}, {b: 3}]
call(*scores, alpha: nil)
What is going wrong here?