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 3 #2

Merged
merged 7 commits into from
Mar 27, 2024
Merged

Add support for Ruby 3 #2

merged 7 commits into from
Mar 27, 2024

Conversation

tiinapennala
Copy link
Contributor

@tiinapennala tiinapennala commented Mar 26, 2024

In ruby 3 keyword and positional arguments are separated and hash is treated as a single positional argument.
This change supports both ruby 2 and 3 with both hashes and keyword arguments.

In documentation: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

this style is not recommended in new code, unless you are often passing a Hash as a positional argument, and are also using keyword arguments. Otherwise, use double splat

In ruby 3 keyword and positional arguments are separated and hash is treated as a single positional argument.
@tiinapennala tiinapennala marked this pull request as draft March 26, 2024 12:59
@tiinapennala tiinapennala marked this pull request as ready for review March 27, 2024 09:01
@tiinapennala tiinapennala requested review from amkisko and vesan and removed request for vesan and amkisko March 27, 2024 09:05
@vesan vesan merged commit fd381a7 into master Mar 27, 2024
2 checks passed
@amkisko amkisko deleted the support-for-ruby-3 branch March 27, 2024 14:25
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