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

(maint) Simplifies SSLContext intialization #9073

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

mhashizume
Copy link
Contributor

@mhashizume mhashizume commented Jun 20, 2023

Ruby 2.5 added the keyword_init: true option to Struct.new to enable keyword arguments.

This commit updates the Puppet::SSL::SSLContext to take advantage of this language feature and removes a workaround needed for older versions of Ruby.

Additionally, Ruby 3.2 addeed the ability to initialize a Struct with keyword arguments without the keyword_init: true option. This commit adds a comment noting that, so it can be removed in the future when Puppet drops support for Ruby < 3.2.

@mhashizume mhashizume requested a review from a team as a code owner June 20, 2023 17:58
@mhashizume mhashizume changed the base branch from main to 7.x June 20, 2023 17:58
@mhashizume mhashizume force-pushed the maint/7.x/keyword-struct branch 2 times, most recently from 4836dd0 to e84c6c0 Compare June 20, 2023 23:16
@mhashizume mhashizume marked this pull request as draft June 20, 2023 23:16
@mhashizume mhashizume force-pushed the maint/7.x/keyword-struct branch 3 times, most recently from d1f9e70 to 0a561ee Compare September 24, 2023 04:18
Ruby 2.5 added the `keyword_init: true` option to Struct.new to enable
keyword arguments.

This commit updates the Puppet::SSL::SSLContext to take advantage of
this language feature and removes a workaround needed for older versions
of Ruby.

Additionally, Ruby 3.2 addeed the ability to initialize a Struct with
keyword arguments without the `keyword_init: true` option. This commit
adds a comment noting that, so it can be removed in the future when
Puppet drops support for Ruby < 3.2.
@mhashizume mhashizume marked this pull request as ready for review September 28, 2023 22:47
@joshcooper joshcooper added the maintenance Maintenance chores are excluded from changelogs label Nov 15, 2023
@joshcooper joshcooper merged commit f2c9a90 into puppetlabs:7.x Nov 15, 2023
13 checks passed
@mhashizume mhashizume deleted the maint/7.x/keyword-struct branch November 16, 2023 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance chores are excluded from changelogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants