package Math::BigRat;
# anythig older is untested, and unlikely to work
-use 5.006002;
+use 5.006;
use strict;
use Math::BigFloat;
@ISA = qw(Math::BigFloat);
-$VERSION = '0.20';
+$VERSION = '0.21';
use overload; # inherit overload from Math::BigFloat
{
my ($self,$x) = ref($_[0]) ? (undef,$_[0]) : objectify(1,@_);
- return Math::BigInt->new($x) if $x->{sign} !~ /^[+-]$/; # NaN, inf etc
+ # NaN, inf etc
+ return Math::BigInt->new($x->{sign}) if $x->{sign} !~ /^[+-]$/;
my $u = Math::BigInt->bzero();
$u->{sign} = $x->{sign};