Skip to content

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

Merged
jekyllbot merged 1 commit intojekyll:masterfrom
mtasaka:ruby32-struct-init-change
Dec 29, 2022
Merged

test: use hash explicitly for Struct initializer for ruby 3.2#9237
jekyllbot merged 1 commit intojekyll:masterfrom
mtasaka:ruby32-struct-init-change

Conversation

@mtasaka
Copy link
Copy Markdown
Contributor

@mtasaka mtasaka commented Dec 29, 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 test code, use hash explicitly.

Fixes #9236 .

Summary

Context

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 test code, use hash explicitly.

Fixes jekyll#9236 .
Copy link
Copy Markdown
Member

@ashmaroli ashmaroli left a comment

Choose a reason for hiding this comment

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

LGTM!

@ashmaroli
Copy link
Copy Markdown
Member

Thanks @mtasaka
@jekyllbot: merge +dev

@jekyllbot jekyllbot merged commit 249101a into jekyll:master Dec 29, 2022
jekyllbot added a commit that referenced this pull request Dec 29, 2022
github-actions bot pushed a commit that referenced this pull request Dec 29, 2022
Mamoru TASAKA: test: use hash explicitly for Struct initializer for ruby 3.2 (#9237)

Merge pull request 9237
@mtasaka
Copy link
Copy Markdown
Contributor Author

mtasaka commented Dec 29, 2022

Thank you for very quick merge!

oturpe pushed a commit to oturpe/jekyll that referenced this pull request Jan 30, 2023
mattr- added a commit that referenced this pull request Dec 27, 2023
Backport #9237 to 4.3-stable "test: use hash explicitly for Struct initializer for ruby 3.2"
@jekyll jekyll locked and limited conversation to collaborators Dec 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ruby3.2: bundle exec rake test fails even if modifying taintness issue with liquid 4

3 participants