Skip to content

Conversation

@G-Rath
Copy link
Contributor

@G-Rath G-Rath commented Oct 22, 2025

The current use of prepend results in deprecation warnings on Ruby 3.4 since in the future strings will be frozen by default so this changes the implementation to build a new string instead

@CLAassistant
Copy link

CLAassistant commented Oct 22, 2025

CLA assistant check
All committers have signed the CLA.

@G-Rath G-Rath marked this pull request as ready for review October 22, 2025 19:41
@G-Rath G-Rath requested a review from a team as a code owner October 22, 2025 19:41
Copilot AI review requested due to automatic review settings October 22, 2025 19:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses Ruby 3.4 deprecation warnings by eliminating string mutation operations. The changes replace prepend method calls with string interpolation to build new strings instead of modifying existing ones, preparing the codebase for Ruby's future default string freezing behavior.

Key Changes:

  • Replaced mutating prepend calls with non-mutating string interpolation in two locations

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/axe-core-api/lib/axe/api/results/rule.rb Updated indent lambda to use string interpolation instead of prepend for adding leading spaces
packages/axe-core-api/lib/axe/api/results/checked_node.rb Updated failure message formatting to use string interpolation instead of prepend for adding bullet points

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@scottmries
Copy link
Contributor

Thanks for this! Closing it for #462, which will allow our tests to run.

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.

3 participants