class RSpec::Support::MethodSignature

def has_kw_args_in?(args)

the rest will be grouped in another Hash and passed as positional argument.
If the last argument is Hash, Ruby will treat only symbol keys as keyword arguments
def has_kw_args_in?(args)
  Hash === args.last &&
    could_contain_kw_args?(args) &&
    (RubyFeatures.kw_arg_separation? || args.last.empty? || args.last.keys.any? { |x| x.is_a?(Symbol) })
end