On 6/19/20 10:51 PM, Andrew Stitcher wrote:
> On Tue, 2020-06-16 at 17:44 +0200, Ivo Wever wrote:
>>
>> ... [1] There is a bug there though: there's an incompatibility
>> between the SWIG bindings and Ruby versions above 2.4. The SWIG
>> bindings assume a distinction between 'Fixnum' and 'Bignum' types
>> that no longer exists at the Ruby type level for those versions. If
>> you try to set a number larger than 2**31-1, it will wrap around.
>> If you try to set a number larger than 2**32-1, you get 0, always.
>> 
>> This is because the bindings uses a macro from the Ruby C 
>> bindings, FIX2LONG, which should be NUM2LONG for these versions.
>> The FIX2LONG doesn't take the unification of 'Fixnum' and 'Bignum'
>> into account and converts anything it can't handle into 0.
>> 
>> (For Ruby versions above 2.4 the T_BIGNUM case in the SWIG 
>> bindings is simply never matched, as the T_FIXNUM case is matched
>> by any integer)
> 
> It would really help if you could create an issue in the project
> JIRA for this because otherwise there is no chance it will be tracked
> and fixed.
> 
Hi Andrew,

I created https://issues.apache.org/jira/browse/PROTON-2241.

Note that my initial explanation as quoted above was completely wrong. I
assumed things had worked correctly in the past, but I now guess this
issue has always existed.

best regards,
-- 
Ivo Wever


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to