Skip to content

Ruby 3 compatibility #25

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

Merged
merged 7 commits into from
Feb 13, 2023
Merged

Conversation

leamotta
Copy link
Contributor

@leamotta leamotta commented Feb 6, 2023

Ruby 3 introduces breaking changes when it comes to positional and keyword arguments https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

This PR adjusts the call to I18n#translate, using the splat operator (**) to send a set of keyword arguments instead of a hash.
Prevents the following error:
Screenshot 2023-02-06 at 17 26 26

@dblock
Copy link
Collaborator

dblock commented Feb 7, 2023

We need to first put back CI (Travis is MIA) and add Ruby 3.x to the mix. Want to help? Maybe copy from https://github.com/mongoid/mongoid-grid_fs or https://github.com/mongoid/mongoid-locker?

@leamotta leamotta force-pushed the leamotta/ruby-3-support branch 4 times, most recently from babd257 to 264d852 Compare February 10, 2023 13:48
@leamotta leamotta force-pushed the leamotta/ruby-3-support branch from 264d852 to bceebcf Compare February 10, 2023 13:56
@leamotta leamotta force-pushed the leamotta/ruby-3-support branch from 93b07c3 to 6e80f43 Compare February 10, 2023 14:19
@leamotta
Copy link
Contributor Author

@dblock Thanks for the quick feedback! Have addressed this in the last commits. CI running green here https://github.com/leamotta/mongoid-scroll/actions

@dblock
Copy link
Collaborator

dblock commented Feb 12, 2023

Looks great! Care to update https://github.com/mongoid/mongoid-scroll/blob/master/CHANGELOG.md please? Danger would complain but it will only run after we merge on future PRs.

@dblock
Copy link
Collaborator

dblock commented Feb 12, 2023

Btw, there are many projects in the mongoid org that could use similar help :)

Screen Shot 2023-02-12 at 10 22 22 AM

@leamotta
Copy link
Contributor Author

@dblock Ready!

@dblock dblock merged commit bb7d723 into mongoid:master Feb 13, 2023
@dblock
Copy link
Collaborator

dblock commented Feb 13, 2023

@leamotta Any interest in helping out with maintaining this library? If yes email me your rubygems login to dblock at dblock dot org.

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

Successfully merging this pull request may close these issues.

None yet

2 participants