Closed godric closed 3 years ago
Hi @godric, Thanks for this. We are already aware of this and are looking into it. It has been raised here previously. https://github.com/bugsnag/bugsnag-api-ruby/pull/28. I will close this as we are tracking it via the pull request.
Describe the bug
The gem calls
URI.escape
inBugsnag::Client#request
: https://github.com/bugsnag/bugsnag-api-ruby/blob/bccaf4b4f3811d3a415ff2ce2649df996cf0bbbe/lib/bugsnag/api/client.rb#L188This method is obsolete: it raises a warning in 2.7.x and has been removed in 3.x. Escaping methods from
CGI.escape
should be used instead, see https://ruby-doc.org/stdlib-2.7.1/libdoc/uri/rdoc/URI/Escape.html#method-i-escape-label-DescriptionBe warned that
CGI.escape
andURI.escape
produce different results, especially with the/
char, eg:Steps to reproduce
NoMethodError
being raised, ie:Environment
Workaround
Patch the method back into
URI
, ie: