It seems that the division of a small number by a bigint, where one of the operands is a negative number, is not working correctly.
For example, the following code:
mruby returns 1, while ruby 3.3 returns -1.
The same issue occurs with the divmod method:
mruby returns [1, 99999999999999999999], while ruby 3.3 returns [-1, 99999999999999999999].
Probably, there is a problem with the calculation of the sign of the result after rounding.
It seems that the division of a small number by a bigint, where one of the operands is a negative number, is not working correctly.
For example, the following code:
mruby returns
1, while ruby 3.3 returns-1.The same issue occurs with the
divmodmethod:mruby returns
[1, 99999999999999999999], while ruby 3.3 returns[-1, 99999999999999999999].Probably, there is a problem with the calculation of the sign of the result after rounding.