rspec-expectations
rspec-expectations copied to clipboard
Ruby 3.0.3 and keyword arguments
Subject of the issue
When using ruby 3.0.3 manually defined chained rspec matchers with keyword parameters don't forwards the arguments correctly
Your environment
- Ruby version: 3.0.3
- rspec-expectations version: 3.10.2
Description
Checkout the file: https://github.com/rspec/rspec-expectations/blob/main/lib/rspec/matchers/dsl.rb
Go to row 304 and 305, they currently look like this:
define_user_override(method_name, definition) do |*args, &block|
super(*args, &block)
and accordingly to this explanation for ruby 3 they should look like
define_user_override(method_name, definition) do |*args, **kwargs, &block|
super(*args, **kwargs, &block)
Am I overseeing something? Thanks in advance! Best regards, Lukas