kpumuk opened a new pull request, #3249: URL: https://github.com/apache/thrift/pull/3249
`Fixnum` type has been deprecated since Ruby 2.4 and removed in Ruby 3.0, which makes BaseProtocol incompatible with modern Ruby versions. This change removes the Fixnum reference, as well as a monkey-patch that introduces `Fixnum#ord()` to Ruby versions below 1.8.7. > [!IMPORTANT] > **This change essentially makes it officially required to use Ruby 2.4 or newer.** Currently, LANGUAGES.md mentions Ruby 2.3.1 as the minimum version, which had an EOL in [March 2019](https://endoflife.date/ruby). With a series of changes, I am trying to revive the continuous integration pipeline for Ruby, and have currently the test suite pass for up to 3.4.7. I propose to bump the minimum required Ruby version to 2.4.0, and update the "tested up to" version to 3.4.7 once the pipeline is completely green and running on GitHub. Fixes the following test failures: ``` 1) BaseProtocol Thrift::BaseProtocol should write out the different types (deprecated write_type signature) Failure/Error: if field_info.is_a? Fixnum NameError: uninitialized constant Thrift::BaseProtocol::Fixnum # ./lib/thrift/protocol/base_protocol.rb:256:in 'Thrift::BaseProtocol#write_type' # ./spec/base_protocol_spec.rb:65:in 'block (3 levels) in <top (required)>' 2) BaseProtocol Thrift::BaseProtocol should write out the different types Failure/Error: if field_info.is_a? Fixnum NameError: uninitialized constant Thrift::BaseProtocol::Fixnum # ./lib/thrift/protocol/base_protocol.rb:256:in 'Thrift::BaseProtocol#write_type' # ./spec/base_protocol_spec.rb:90:in 'block (3 levels) in <top (required)>' 3) BaseProtocol Thrift::BaseProtocol should read the different types (deprecated read_type signature) Failure/Error: if field_info.is_a? Fixnum NameError: uninitialized constant Thrift::BaseProtocol::Fixnum # ./lib/thrift/protocol/base_protocol.rb:296:in 'Thrift::BaseProtocol#read_type' # ./spec/base_protocol_spec.rb:113:in 'block (3 levels) in <top (required)>' 4) BaseProtocol Thrift::BaseProtocol should read the different types Failure/Error: if field_info.is_a? Fixnum NameError: uninitialized constant Thrift::BaseProtocol::Fixnum # ./lib/thrift/protocol/base_protocol.rb:296:in 'Thrift::BaseProtocol#read_type' # ./spec/base_protocol_spec.rb:136:in 'block (3 levels) in <top (required)>' ``` <!-- We recommend you review the checklist/tips before submitting a pull request. --> - [ ] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? ([Request account here](https://selfserve.apache.org/jira-account.html), not required for trivial changes) - [ ] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"? - [x] Did you squash your changes to a single commit? (not required, but preferred) - [x] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"? - [x] If your change does not involve any code, include `[skip ci]` anywhere in the commit message to free up build resources. <!-- The Contributing Guide at: https://github.com/apache/thrift/blob/master/CONTRIBUTING.md has more details and tips for committing properly. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
