twilio / twilio-ruby

A Ruby gem for communicating with the Twilio API and generating TwiML
MIT License
1.36k stars 464 forks source link

fix: Adds Ruby 3.0 to Travis. Fixes test. #545

Closed philnash closed 3 years ago

philnash commented 3 years ago

The code is correct in the VoiceResponse, but the test is wrong. The body of a task is a JSON object, so the argument should be a hash. Originally this was implemented, in the test, as a hash omitting the curly braces, however Ruby 3 is more strict about how hashes and keyword arguments work together. To submit the body as a hash, you can no longer omit the braces. Once that was fixed, the tests all pass under Ruby 3.

Checklist

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.