From bb23c75c8da65cfd8b578e4a17d123cc83f1bf4e Mon Sep 17 00:00:00 2001 From: Joel Sugarman Date: Tue, 7 Jan 2025 17:03:12 +0000 Subject: [PATCH] Add unary operator to mutable string This avoids deprecation warnings when running against ruby 3.4.1 and prepares for later versions (4.0) that will default to `# frozen_string_literal: true`. Deprecation warning: ```sh gems/puffing-billy-4.0.0/lib/billy/proxy_connection.rb:33: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) ``` Example CI with deprecation warnings: https://app.circleci.com/pipelines/github/ministryofjustice/laa-apply-for-legal-aid/32282/workflows/b137f673-cb4e-4f21-a307-86050bde6e87/jobs/168908/parallel-runs/0?filterBy=ALL --- lib/billy/proxy_connection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/billy/proxy_connection.rb b/lib/billy/proxy_connection.rb index 3f44c7d..d998d1d 100644 --- a/lib/billy/proxy_connection.rb +++ b/lib/billy/proxy_connection.rb @@ -22,7 +22,7 @@ def receive_data(data) def on_message_begin @headers = nil - @body = '' + @body = +'' end def on_headers_complete(headers)