-
Notifications
You must be signed in to change notification settings - Fork 328
Closed
Description
It seems that after upgrade I am unable to cast an HTTP-rb response to a string:
[4] pry(main)> resp.to_s
/app/vendor/bundle/ruby/2.7.0/gems/pry-0.12.2/lib/pry/exceptions.rb:28: warning: $SAFE will become a normal global variable in Ruby 3.0
FrozenError: can't modify frozen String: ""
from /app/vendor/bundle/ruby/2.7.0/gems/http-4.2.0/lib/http/response/body.rb:52:in `force_encoding'
[5] pry(main)> resp.body.to_s
/app/vendor/bundle/ruby/2.7.0/gems/pry-0.12.2/lib/pry/exceptions.rb:28: warning: $SAFE will become a normal global variable in Ruby 3.0
HTTP::StateError: body is being streamed
from /app/vendor/bundle/ruby/2.7.0/gems/http-4.2.0/lib/http/response/body.rb:45:in `to_s'
[6] pry(main)> resp.class
HTTP::Response < Object
[7] pry(main)> resp.to_s
/app/vendor/bundle/ruby/2.7.0/gems/pry-0.12.2/lib/pry/exceptions.rb:28: warning: $SAFE will become a normal global variable in Ruby 3.0
HTTP::StateError: body is being streamed
from /app/vendor/bundle/ruby/2.7.0/gems/http-4.2.0/lib/http/response/body.rb:45:in `to_s'
DannyBen, sue445, brittballard, ChrisZou and AdrieanKhisbe
Metadata
Metadata
Assignees
Labels
No labels