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

reassign variable with frozen string instead of appending to it #423

Merged
merged 1 commit into from
Mar 24, 2017
Merged

reassign variable with frozen string instead of appending to it #423

merged 1 commit into from
Mar 24, 2017

Conversation

brendenyule
Copy link

@brendenyule brendenyule commented Mar 24, 2017

This change allows us to change string variables without actually mutating them.
This allows these files to be compatible with ruby 3.0 in the future.

Ruby 3.0 will have frozen strings, which prevents the << operator from working, because it attempts to mutate a frozen string.

Using the += operator reassigns the original variable instead of mutating it.

Fixes #422

@jjasghar
Copy link
Contributor

Awesome. Does this fix your original problem too?

@brendenyule
Copy link
Author

brendenyule commented Mar 24, 2017

Yeah, this deploys just fine now.

@jjasghar
Copy link
Contributor

Perfect, i'll push out this fix asap.

@brendenyule
Copy link
Author

Awesome, thanks!

@jjasghar jjasghar merged commit ec33a5f into rabbitmq:master Mar 24, 2017
@michaelklishin
Copy link
Member

@brendenyule thank you!

@brendenyule
Copy link
Author

@michaelklishin np. Thanks for the help guys!

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