The change expands the matching criteria for kwargs from x.is_a?(Symbol) to x.is_a?(Symbol) || x.is_a?(String). This now properly mirrors the behavior in the ruby docs.
Elsewhere tests were asserting that args with string keys were treated as optional arguments. I have not tested if this is true for ruby prior to ruby 3, but this is NOT true for ruby 3, and I've adjusted those tests.
Testing
bundle exec rspec spec/rspec/support/method_signature_verifier_spec.rb
...
Finished in 0.03491 seconds (files took 0.09141 seconds to load)
268 examples, 0 failures
Running script/run_build fails with a permissions error during rspec, so I don't have a clean test pass of the whole repo.
Attempting to fix: https://github.com/rspec/rspec-support/issues/554
The change expands the matching criteria for kwargs from
x.is_a?(Symbol)
tox.is_a?(Symbol) || x.is_a?(String)
. This now properly mirrors the behavior in the ruby docs.https://docs.ruby-lang.org/en/3.0/syntax/calling_methods_rdoc.html#label-Hash+to+Keyword+Arguments+Conversion
Elsewhere tests were asserting that args with string keys were treated as optional arguments. I have not tested if this is true for ruby prior to ruby 3, but this is NOT true for ruby 3, and I've adjusted those tests.
Testing
Running script/run_build fails with a permissions error during rspec, so I don't have a clean test pass of the whole repo.