diff --git a/lib/rspec/support/method_signature_verifier.rb b/lib/rspec/support/method_signature_verifier.rb index 42d7cb68..524da9bd 100644 --- a/lib/rspec/support/method_signature_verifier.rb +++ b/lib/rspec/support/method_signature_verifier.rb @@ -84,7 +84,6 @@ def has_kw_args_in?(args) if RubyFeatures.kw_arg_separation? # If the last arg is a hash, depending on the signature it could be kw_args or a positional parameter. return false unless Hash === args.last && could_contain_kw_args?(args) - # If the method signature contains **kwargs, the last argument being a hash means its the kwargs hash. # The hash being a required positional argument is considered inside could_contain_kw_args return true if @allows_any_kw_args