FIX: Code adjustment to unfreeze strings

FIX: Code adjustment to unfreeze strings

diff --git a/lib/message_bus/http_client.rb b/lib/message_bus/http_client.rb
index 997125c..a790ebd 100644
--- a/lib/message_bus/http_client.rb
+++ b/lib/message_bus/http_client.rb
@@ -246,7 +246,7 @@ module MessageBus
       request.body = poll_payload
 
       if @enable_long_polling
-        buffer = ''
+        buffer = +""
 
         http.request(request) do |response|
           response.read_body do |chunk|
diff --git a/spec/lib/fake_async_middleware.rb b/spec/lib/fake_async_middleware.rb
index b15a71c..c3f244e 100644
--- a/spec/lib/fake_async_middleware.rb
+++ b/spec/lib/fake_async_middleware.rb
@@ -54,7 +54,7 @@ class FakeAsyncMiddleware
 
   def translate_io_result(io)
     data = io.string
-    body = ""
+    body = +""
 
     parser = Http::Parser.new
     parser.on_body = proc { |chunk| body << chunk }
@@ -113,7 +113,7 @@ class FakeAsyncMiddleware
         # more judo with deferrable body, at this point we just have headers
         r[2].callback do
           # even more judo cause rack test does not call each like the spec says
-          body = ""
+          body = +""
           r[2].each do |m|
             body << m
           end
diff --git a/spec/lib/message_bus/client_spec.rb b/spec/lib/message_bus/client_spec.rb
index 86bda68..82f6bfc 100644
--- a/spec/lib/message_bus/client_spec.rb
+++ b/spec/lib/message_bus/client_spec.rb
@@ -85,7 +85,7 @@ describe MessageBus::Client do
 
       _(data[-5..-1]).must_equal "0\r\n\r\n"
 
-      _, _, chunks = http_parse("HTTP/1.1 200 OK\r\n\r\n" << data)
+      _, _, chunks = http_parse(+"HTTP/1.1 200 OK\r\n\r\n" << data)
 
       _(chunks.length).must_equal 2
 
diff --git a/spec/lib/message_bus/connection_manager_spec.rb b/spec/lib/message_bus/connection_manager_spec.rb
index dca0476..8a66b43 100644
--- a/spec/lib/message_bus/connection_manager_spec.rb
+++ b/spec/lib/message_bus/connection_manager_spec.rb
@@ -8,7 +8,7 @@ class FakeAsync
 
   def <<(val)
     sleep 0.01 # simulate IO
-    @sent ||= ""
+    @sent ||= +""
     @sent << val
   end

GitHub sha: c64e3d30

1 Like

This commit appears in #215 which was merged by @SamSaffron.