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

test: use hash explicitly for Struct initializer for ruby 3.2 #165

Merged
merged 1 commit into from
Jan 22, 2023

Conversation

mtasaka
Copy link
Contributor

@mtasaka mtasaka commented Dec 27, 2022

ruby 3.2 changes Struct.new behavior so that keyword_init option is enabled by default. This means that keyword argument passed to the initializer of Struct is now treated differently with ruby3.2.

To avoid behavior change in jekyll-toc test code, use hash explicitly for Struct initializer.

Closes #164 .

ruby 3.2 changes Struct.new behavior so that keyword_init option is
enabled by default. This means that keyword argument passed to
the initializer of Struct is now treated differently with ruby3.2.

To avoid behavior change in jekyll-toc test code, use hash explicitly
for Struct initializer.

Closes toshimaru#164 .
@mtasaka mtasaka force-pushed the ruby32-fix-hash-for-struct-init branch from 4522909 to eb23895 Compare December 27, 2022 16:40
@mtasaka mtasaka changed the title test: usee hash explicitly for Struct initializer for ruby 3.2 test: use hash explicitly for Struct initializer for ruby 3.2 Dec 27, 2022
@mtasaka mtasaka mentioned this pull request Dec 27, 2022
Copy link
Owner

@toshimaru toshimaru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for my late reply. 🐢

Thanks for your contribution 👍

@toshimaru toshimaru merged commit 0d5f56c into toshimaru:master Jan 22, 2023
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.

rake test fails with ruby3.2
2 participants