Unless you need it later, I would suggest to pass the modified string directly to the method call.

```ruby
response = query_the_socket("+ z #{string}", host)
```