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
Conversation
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 |
@djberg96 'roliveri jerryk55' is an invalid reviewer, ignoring... |
@djberg96 'roliveri, jerryk55' is an invalid reviewer, ignoring... |
@miq-bot add_label bug, ivanchuk/yes |
@djberg96 'jerryk55' is an invalid reviewer, ignoring... |
Well, in that I'm "invalid", I approve regardless.... :-) |
Dup strings in case they're frozen before force_encoding (cherry picked from commit c84fb58) https://bugzilla.redhat.com/show_bug.cgi?id=1535782
Ivanchuk backport details:
|
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