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

Refactor URI host handling to ensure downcasing is applied correctly on frozen strings #3097

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

pedrol3001
Copy link
Contributor

Overview

When passing a frozen string as the host, the agent breaks with the following error:

FrozenError (can't modify frozen String)

I encountered this issue while using the Pusher gem. The idea of this pull request is to replace the use of the downcase! method with a reassignment of the string, preventing errors when working with frozen strings.

I have applied thos changes on my project and it started to work fine.

Submitter Checklist:

  • Include a link to the related GitHub issue, if applicable.
  • Include a security review link, if applicable

Testing

The agent includes a suite of unit and functional tests which should be used to
verify your changes don't break existing functionality. These tests will run with
GitHub Actions when a pull request is made. More details on running the tests locally can be found
here for our unit tests,
and here for our functional tests.
For most contributions it is strongly recommended to add additional tests which
exercise your changes.

Reviewer Checklist

  • Perform code review
  • Add performance label
  • Perform appropriate level of performance testing
  • Confirm all checks passed
  • Add version label prior to acceptance

Sorry, something went wrong.

@github-actions github-actions bot added the community To tag external issues and PRs submitted by the community label Mar 26, 2025
Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

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

Thanks, @pedrol3001! Good catch. This looks great!

@kaylareopelle kaylareopelle merged commit daa7436 into newrelic:dev Mar 27, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community To tag external issues and PRs submitted by the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants