Skip to content

Commit

Permalink
Add unary operator to mutable string
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jsugarman committed Jan 7, 2025
1 parent 89e7ed3 commit bb23c75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/billy/proxy_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def receive_data(data)

def on_message_begin
@headers = nil
@body = ''
@body = +''
end

def on_headers_complete(headers)
Expand Down

0 comments on commit bb23c75

Please sign in to comment.