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

(#302) Fix warnings generated by ERB.new #308

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

danielparks
Copy link
Contributor

This has to special case Ruby <2.6.0 since those versions will interpret the keyword argument as a hash passed as the second argument.

Without this change running this code in Ruby 2.6+ will generate warnings about the parameters passed to ERB.new.


I’ve run the tests under Ruby 2.3.0 (with some dificulty; see #301) and this appears to work. At the very least it clears up all the warnings.

@danielparks danielparks requested a review from a team as a code owner September 26, 2022 02:30
Copy link
Contributor

@chelnak chelnak left a comment

Choose a reason for hiding this comment

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

LGTM!

@chelnak chelnak self-assigned this Sep 26, 2022
@chelnak chelnak added the bug label Sep 26, 2022
@chelnak chelnak linked an issue Sep 26, 2022 that may be closed by this pull request
This has to special case Ruby <2.6.0 since those versions will interpret
the keyword argument as a hash passed as the second argument.

Without this change running this code in Ruby 2.6+ will generate
warnings about the parameters passed to `ERB.new`.
@chelnak chelnak merged commit 02d29f2 into puppetlabs:main Sep 26, 2022
@danielparks danielparks deleted the fix_erb branch September 26, 2022 08:31
@bastelfreak
Copy link
Collaborator

@chelnak since this causes a lot of noise on ruby3, could you do a new release please?

@chelnak
Copy link
Contributor

chelnak commented Sep 26, 2022

Ideally I would like to cut a new release for this today.

There are some other clean-up tasks that I want to sort out first though.

@chelnak chelnak added bugfix and removed bug labels Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lots of warnings about when running unit tests
3 participants