Subject: | should bit operations make Math::BigRat crash? |

MIME-Version: | 1.0 |

Content-Type: | text/plain; charset="UTF-8" |

X-Mailer: | MIME-tools 5.427 (Entity 5.427) |

Content-Disposition: | inline |

Content-Transfer-Encoding: | binary |

X-RT-Original-Encoding: | utf-8 |

Content-Length: | 950 |

Hello,
I think there is an issue with some overloaded operations Math::BigRat
inherits from Math::BigInt but fails to properly override. Test Code follows:
use Math::BigRat;
$x = Math::BigRat->new('1') | 0;
Can't use an undefined value as an ARRAY reference at .../Math/BigInt/Calc.pm line
1175.
Math::BigInt::Calc::_acmp('Math::BigInt::FastCalc', undef, undef) called at
.../Math/BigInt/Calc.pm line 2142
Math::BigInt::Calc::_or('Math::BigInt::FastCalc', undef, undef) called at
.../Math/BigInt.pm line 2105
Math::BigInt::bior('Math::BigRat=HASH(0x80fb0c)', 0) called at
.../Math/BigInt.pm line 129
Math::BigInt::__ANON__('Math::BigRat=HASH(0x803030)', 0, '') called at test.pl
line 2
I had expected an error message telling me that "bitwise or" is not implemented for
rationals, or, since this particular value is actually an integer, success.
I am using Math::BigRat version 0.24, Math::BigInt version 1.89_01, perl 5.12.1.
-Martin