Skip to content
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

Add helper for running class_exec with keywords when needed #407

Merged
merged 1 commit into from Apr 8, 2020

Conversation

@JonRowe
Copy link
Member

JonRowe commented Apr 6, 2020

This is an extraction from a pr on rspec-core but its going to be a repeated pattern to fix keyword arguments across the gem so I'm adding it here. I expect to add more as I find other places that keyword arguments don't work quite right.

The aim will be to keep the string eval to a minimum and this will all be replaced with proper **kwargs in RSpec 4, which I want to release in the later half of this year before the next version of Ruby.

@JonRowe JonRowe force-pushed the kwargs-class-exec branch 4 times, most recently from a82ab9c to 97d3289 Apr 6, 2020
@JonRowe JonRowe force-pushed the kwargs-class-exec branch from 97d3289 to 8c3a1bb Apr 8, 2020
Copy link
Member

benoittgt left a comment

🎉

@JonRowe JonRowe merged commit 5915149 into master Apr 8, 2020
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@JonRowe JonRowe deleted the kwargs-class-exec branch Apr 8, 2020
@JonRowe
Copy link
Member Author

JonRowe commented Apr 8, 2020

Merged because something odd is going on with the sub builds which means this wasn't picked up on the pinned branch.

@pirj
pirj approved these changes Apr 8, 2020
Copy link
Member

pirj left a comment

Looks good!
Sorry for the late appearance, hard day at work.

JonRowe added a commit that referenced this pull request May 2, 2020
Add helper for running class_exec with keywords when needed
@benoittgt
Copy link
Member

benoittgt commented May 14, 2020

On this subject https://discuss.rubyonrails.org/t/new-2-7-3-0-keyword-argument-pain-point/74980 (cc @JonRowe @pirj )

Probably soon-to-be-released 2.7.2 will remove/reduce the warning regarding keyword arguments.

@JonRowe
Copy link
Member Author

JonRowe commented May 14, 2020

I've added a reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.