Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
**kwd, call(**kwd) does not behave like MRI. #3572
The following was discovered through RSpec Mocks and I'm cross posting it just in-case. Given the following code:
The method being wrapped never receives the kwd, this was discovered when our specs started failing on JRuby when we started defaulting to reduce duplication in our specs, which ultimately was dumb anyways but it still surfaced an inconsistency.
RSpec Mocks Ticket: rspec/rspec-mocks#1045
This was no doubt fixed a very long time ago but I used this snippet to verify:
define_method(:foo) do |method, *args, **kwd| kwd[:root] = true unless kwd.key?(:root) || kwd.key?(:root_metadata) method.call(*args, **kwd) end foo(proc do |*b, **k| p b, k end)
I would be incredibly surprised if we do not already have a test/spec on this between the testing suites so closing. I will close against next release so people can notice this was fixed in release notes.