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

Conversation

Projects
None yet
3 participants
@brendenyule
Copy link

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

This comment has been minimized.

Copy link
Collaborator

commented Mar 24, 2017

Awesome. Does this fix your original problem too?

@brendenyule

This comment has been minimized.

Copy link
Author

commented Mar 24, 2017

Yeah, this deploys just fine now.

@jjasghar

This comment has been minimized.

Copy link
Collaborator

commented Mar 24, 2017

Perfect, i'll push out this fix asap.

@brendenyule

This comment has been minimized.

Copy link
Author

commented Mar 24, 2017

Awesome, thanks!

@jjasghar jjasghar merged commit ec33a5f into rabbitmq:master Mar 24, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
@michaelklishin

This comment has been minimized.

Copy link
Member

commented Mar 24, 2017

@brendenyule thank you!

@brendenyule

This comment has been minimized.

Copy link
Author

commented Mar 24, 2017

@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
You can’t perform that action at this time.