twurl
twurl copied to clipboard
INVESTIGATE: compatibility with Ruby 3
Issue to explore and document compatibility between twurl
and Ruby v3.
Contributions and PRs are welcomed.
The -H
option is not working in Ruby 3.0 - suspiciously similar to #154 which was an issue with the -X
param.
Rake conformance tests are failing in Ruby 3.0 but work in 2.7.2 (macOS)
@andypiper I can help you with that if you need a hand. I think the reason why it stopped working since Ruby 3 is likely due to this bug: https://github.com/ruby/ostruct/issues/23
We indeed rely on the OpenStruct here: https://github.com/twitter/twurl/blob/master/lib/twurl/cli.rb#L361-L400 and the symptom/condition looks to be similar.
As you can see in that issue link, the fix has been merged into Ruby upstream but they haven't released a new Ruby 3.x.x version yet, so we might need to wait for that. I'm not sure how long it takes, but once it's released and users update their Ruby runtime we probably don't need any particular fixes for Ruby 3.
opened https://github.com/twitter/twurl/pull/161