Skip to content

fix(ruby): avoid mutating frozen string literals by replacing upcase! #4755

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

Merged
merged 3 commits into from
Apr 14, 2025

Conversation

satoruk
Copy link
Contributor

@satoruk satoruk commented Apr 14, 2025

🧭 What and Why

Replaced the destructive method upcase! with its non-destructive counterpart upcase in the logging statement to prevent FrozenError when # frozen_string_literal: true is enabled. This change ensures compatibility with frozen string literals, adhering to best practices for immutable strings in Ruby.

@satoruk satoruk requested a review from a team as a code owner April 14, 2025 08:50
@satoruk satoruk requested review from millotp and shortcuts April 14, 2025 08:50
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

thanks for your contribution !

@millotp millotp merged commit b8d1876 into algolia:main Apr 14, 2025
10 of 12 checks passed
algolia-bot added a commit to algolia/algoliasearch-client-ruby that referenced this pull request Apr 14, 2025
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