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 support for ruby-head (3.1) #288

Merged
merged 1 commit into from
Feb 9, 2021

Conversation

mlarraz
Copy link
Contributor

@mlarraz mlarraz commented Feb 9, 2021

Problem

As of ruby/ruby#4010, Time.new now accepts an optional keyword argument.

This means the monkey patch here will break in newer Ruby versions, because Ruby now requires keyword arguments be handled separately from other arguments.

Solution

Check if ruby2_keywords is defined (Ruby 2.7+), and use it if it is, which will force the previous behavior.

@mlarraz mlarraz mentioned this pull request Feb 9, 2021
@joshuacronemeyer joshuacronemeyer added this to the 0.9.4 milestone Feb 9, 2021
@joshuacronemeyer joshuacronemeyer merged commit 864a0cb into travisjeffery:master Feb 9, 2021
@mlarraz mlarraz deleted the ruby_3.1 branch April 2, 2021 18:57
a2ikm added a commit to a2ikm/mongomapper that referenced this pull request Apr 23, 2022
a2ikm added a commit to a2ikm/mongomapper that referenced this pull request May 17, 2022
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.

2 participants