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

Revert "FIX: When mutating a string to build a diff. Dup it first" #7484

Merged
merged 1 commit into from
May 7, 2019

Conversation

romanrizzi
Copy link
Member

Reverts #7482

This change should have been applied to the frozen_string_literal branch.

@discoursebot
Copy link

You've signed the CLA, romanrizzi. Thank you! This pull request is ready for review.

@SamSaffron
Copy link
Member

this fix itself does look a bit awkward, this file was by a mile the most complex one to convert to froze_string_literal: true, so much mutating of inputs going on.

@SamSaffron SamSaffron merged commit 9adfd66 into master May 7, 2019
@romanrizzi romanrizzi deleted the revert-7482-dup_string_before_mutation branch May 7, 2019 13:10
@romanrizzi
Copy link
Member Author

romanrizzi commented May 7, 2019

That is the only method in that class that mutates a string. Since String#insert is really handy, I thought using dup was the best option here.

I also applied this commit against frozen_string_literal but looks like it disappeared from history after a rebase. If this commit hits that branch, revisions will no longer work on dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants