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

(PA-5666) Fix pl-ruby-patch's filename #708

Conversation

cthorn42
Copy link
Collaborator

@cthorn42 cthorn42 commented Aug 1, 2023

Starting with Ruby 3.2.2 we want to change the file we are sed'ing.

Starting with Ruby 3.2.2 we want to change the file we are sed'ing.
@cthorn42 cthorn42 requested review from a team as code owners August 1, 2023 19:55
@cthorn42
Copy link
Collaborator Author

cthorn42 commented Aug 1, 2023

@@ -61,9 +61,16 @@
sed_command = %(s|Gem.ruby.shellsplit|& << '-r/opt/puppetlabs/puppet/share/doc/rbconfig-#{settings[:ruby_version]}-orig.rb'|)
end

# rubygems switched which file has the command we need to patch starting with ruby 3.2.2
if Gem::Version.new(settings[:ruby_version]) >= Gem::Version.new('3.2.2')
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure of a better way to check for semantic versioning, but this is what a Google search suggested and it works.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 we use that in puppet too

@joshcooper
Copy link
Contributor

joshcooper commented Aug 1, 2023

This is the commit to ruby's ruby_3_2 branch that bumped rubygems and changed the ext_conf_builder.rb path: ruby/ruby@c3c461c#diff-302705c03d7ce33c91c6f9496f9fafc222984d40b34cb2896118ec248f1575f2

@joshcooper joshcooper merged commit 5b0d814 into puppetlabs:master Aug 1, 2023
2 checks passed
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