[ 
https://issues.apache.org/jira/browse/THRIFT-5906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmytro Shteflyuk reassigned THRIFT-5906:
----------------------------------------

    Assignee: Dmytro Shteflyuk

> 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
>            Reporter: Dmytro Shteflyuk
>            Assignee: Dmytro Shteflyuk
>            Priority: Major
>
> {{Fixnum}} type has been deprecated since Ruby 2.4 and removed in Ruby 3.0, 
> which makes {{BaseProtocol}} incompatible with modern Ruby versions.
> 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.
> Fixes the following test failures:
> {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}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to