-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix HelperProxy keyword argument passing for Ruby 3 #894
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this approach is not backwards compatible with all recent Rubies. There is already a PR #885 that fixes this issue in a backwards-compatible way. It is waiting on moderator approval to merge, but hasn't received attention so far.
More info about argument forwarding in different Ruby versions.
@brian-kephart: Have an example of a Ruby version that wouldn't work with the fix? |
I don't know which PR works best, but I thinks this (https://travis-ci.org/github/drapergem/draper/jobs/754121898) should be fixed. And why not merge this (#893) before to have a faster CI. |
@n-rodriguez: Fixed in #895. |
@tbuehlmann the compatibility issues are detailed in the article I linked, specifically at this heading: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/#a-compatible-delegation |
Fine with me. |
@tbuehlmann can you please rebase your branch on |
9bf8737
to
cbf7893
Compare
@n-rodriguez: Sure, done. |
I agree. See: https://github.com/drapergem/draper/pull/894/checks |
Fine with me! Let's close this PR then? |
@tbuehlmann I apologize. Had I been quicker to merge #885, I don't think you would have wasted your time. Either way, your contribution is appreciated. I'm going to close this in favor of the other pull request. |
@codebycliff : Oh don't worry, it's fine. |
It seems Ruby 3 doesn't recognize passed hash arguments as keyword arguments like it did in Ruby 2.7. That's why we need to properly pass keyword arguments.
Fixes #884.