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

Dup strings in case they're frozen before force_encoding #445

Merged
merged 2 commits into from Aug 30, 2019
Merged

Dup strings in case they're frozen before force_encoding #445

merged 2 commits into from Aug 30, 2019

Conversation

djberg96
Copy link
Contributor

Calling force_encoding on a frozen string will bomb. This dups the string first before calling it.

This was already being done at https://github.com/ManageIQ/manageiq-gems-pending/blob/master/lib/gems/pending/util/xml/miq_rexml.rb#L288.

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1535782

@miq-bot
Copy link
Member

miq-bot commented Aug 28, 2019

Checked commits https://github.com/djberg96/manageiq-gems-pending/compare/2dbc22dbefb4b5f7e87398722f81f9d54e975a80~...884a97d7658bc3bb944e85ffe764e38a24a3bfba with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🏆

@djberg96
Copy link
Contributor Author

@miq-bot add_reviewer @roliveri @jerryk55

@miq-bot
Copy link
Member

miq-bot commented Aug 29, 2019

@djberg96 'roliveri jerryk55' is an invalid reviewer, ignoring...

@djberg96
Copy link
Contributor Author

@miq-bot add_reviewers @roliveri, @jerryk55

@miq-bot
Copy link
Member

miq-bot commented Aug 29, 2019

@djberg96 'roliveri, jerryk55' is an invalid reviewer, ignoring...

@djberg96
Copy link
Contributor Author

@miq-bot add_reviewer @roliveri

@djberg96
Copy link
Contributor Author

@miq-bot add_label bug, ivanchuk/yes

@djberg96
Copy link
Contributor Author

@miq-bot add_reviewer @jerryk55

@miq-bot
Copy link
Member

miq-bot commented Aug 29, 2019

@djberg96 'jerryk55' is an invalid reviewer, ignoring...

@jerryk55
Copy link
Member

Well, in that I'm "invalid", I approve regardless.... :-)

@roliveri roliveri merged commit c84fb58 into ManageIQ:master Aug 30, 2019
simaishi pushed a commit that referenced this pull request Sep 3, 2019
Dup strings in case they're frozen before force_encoding

(cherry picked from commit c84fb58)

https://bugzilla.redhat.com/show_bug.cgi?id=1535782
@simaishi
Copy link
Contributor

simaishi commented Sep 3, 2019

Ivanchuk backport details:

$ git log -1
commit 6ac7a5d7dbe65f1b978066ef8721ea5e00dc65ce
Author: Richard Oliveri <roliveri@redhat.com>
Date:   Fri Aug 30 11:21:39 2019 -0400

    Merge pull request #445 from djberg96/deal_with_frozen_strings
    
    Dup strings in case they're frozen before force_encoding
    
    (cherry picked from commit c84fb582648484fbf8c96f4a3d0ac88d49db6587)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1535782

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

Successfully merging this pull request may close these issues.

None yet

5 participants