THRIFT-5906: Remove Fixnum references to support modern Ruby versions #3249
+14
−65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixnumtype 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. 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:
[skip ci]anywhere in the commit message to free up build resources.