ruby-amqp / hutch

A system for processing messages from RabbitMQ.
https://gocardless.com/blog/hutch-inter-service-communication-with-rabbitmq/
MIT License
855 stars 137 forks source link

Do not modify queue name in place. Create a new String #380

Closed douglasmiller closed 2 years ago

douglasmiller commented 2 years ago

I regularly include the magic comment, # frozen_string_literal: true, in my ruby code.

This results in an error when defining a queue_name in a consumer class, since the Hutch::Broker class will modify the string instead of creating a new one: lib/hutch/broker.rb:177:in 'prepend': can't modify frozen String (FrozenError)

michaelklishin commented 2 years ago

Thank you!