You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Dmytro Shteflyuk (Jira)" <ji...@apache.org> on 2025/12/16 22:55:00 UTC
[jira] [Resolved] (THRIFT-5906) Remove Fixnum references to support modern Ruby versions
[ https://issues.apache.org/jira/browse/THRIFT-5906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmytro Shteflyuk resolved THRIFT-5906.
--------------------------------------
Fix Version/s: 0.23.0
Resolution: Fixed
> Remove Fixnum references to support modern Ruby versions
> --------------------------------------------------------
>
> Key: THRIFT-5906
> URL: https://issues.apache.org/jira/browse/THRIFT-5906
> Project: Thrift
> Issue Type: Bug
> Components: Ruby - Library
> Reporter: Dmytro Shteflyuk
> Assignee: Dmytro Shteflyuk
> Priority: Major
> Labels: breaking
> Fix For: 0.23.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> {{Fixnum}} type has been deprecated since Ruby 2.4 and removed in Ruby 3.0, which makes {{BaseProtocol}} incompatible with modern Ruby versions.
> {noformat}
> 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)>'
> {noformat}
> h2. Ruby compatibility
> Currently, Thrift Ruby gem does not require any specific version. It probably works on old version of Ruby, partially works on 3.0+ (except for {{BaseProtocol}}), and does not work on 3.4 unless an explicit dependency on "base64" added to the project.
> Also, {{LANGUAGES.md}} mentions Ruby 2.3.1 as the minimum version, which had an EOL in [March 2019|https://endoflife.date/ruby]. The proposal is to bump the minimum version to *{color:red}2.4.0{color}*, and make it explicit in the gem specification.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)