Skip to content

Commit 451bb38

Browse files
Peter John Acklamjkeenan
authored andcommitted
cpan/Math-BigInt - Update to version 1.999842
1.999842 2023-09-27 * Fix a bug causing Math::BigInt and Math::BigFloat to be caught in an endless recursion. The bug was introduced when trying to fix pjacklam/p5-Math-BigInt#8 * Allow div_scale to be 0. It is not documented what div_scale <= 0 means, but there are modules that set div_scale to 0 (e.g., Astro::Units) and fail their tests if this is not supported.
1 parent c728cf5 commit 451bb38

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

Porting/Maintainers.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,8 @@ package Maintainers;
757757
},
758758

759759
'Math::BigInt' => {
760-
'DISTRIBUTION' => 'PJACKLAM/Math-BigInt-1.999841.tar.gz',
760+
'DISTRIBUTION' => 'PJACKLAM/Math-BigInt-1.999842.tar.gz',
761+
'SYNCINFO' => 'jkeenan on Thu Sep 28 07:49:05 2023',
761762
'SYNCINFO' => 'jkeenan on Sun Sep 24 08:09:46 2023',
762763
'FILES' => q[cpan/Math-BigInt],
763764
'EXCLUDED' => [

cpan/Math-BigInt/lib/Math/BigFloat.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use Carp qw< carp croak >;
2020
use Scalar::Util qw< blessed >;
2121
use Math::BigInt qw< >;
2222

23-
our $VERSION = '1.999841';
23+
our $VERSION = '1.999842';
2424
$VERSION =~ tr/_//d;
2525

2626
require Exporter;

cpan/Math-BigInt/lib/Math/BigInt.pm

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use warnings;
2323
use Carp qw< carp croak >;
2424
use Scalar::Util qw< blessed refaddr >;
2525

26-
our $VERSION = '1.999841';
26+
our $VERSION = '1.999842';
2727
$VERSION =~ tr/_//d;
2828

2929
require Exporter;
@@ -325,7 +325,9 @@ sub div_scale {
325325
if (@_) { # setter
326326
my $ds = shift;
327327
croak("The value for 'div_scale' must be defined") unless defined $ds;
328-
croak("The value for 'div_scale' must be positive") unless $ds > 0;
328+
# It is not documented what div_scale <= 0 means, but Astro::Units sets
329+
# div_scale to 0 and fails its tests if this is not supported.
330+
#croak("The value for 'div_scale' must be positive") unless $ds > 0;
329331
$ds = $ds -> numify() if defined(blessed($ds));
330332
no strict 'refs';
331333
${"${class}::div_scale"} = $ds;
@@ -1601,7 +1603,7 @@ sub babs {
16011603
return $x if $x->modify('babs');
16021604

16031605
return $upgrade -> babs($x, @r)
1604-
if defined($upgrade) && !$x->isa(__PACKAGE__);
1606+
if defined($upgrade) && !$x->isa(__PACKAGE__) && !$x -> isa($upgrade);
16051607

16061608
$x->{sign} =~ s/^-/+/;
16071609

@@ -1615,7 +1617,7 @@ sub bsgn {
16151617
return $x if $x->modify('bsgn');
16161618

16171619
return $upgrade -> bsgn($x, @r)
1618-
if defined($upgrade) && !$x->isa(__PACKAGE__);
1620+
if defined($upgrade) && !$x->isa(__PACKAGE__) && !$x -> isa($upgrade);
16191621

16201622
return $x -> bone("+", @r) if $x -> is_pos();
16211623
return $x -> bone("-", @r) if $x -> is_neg();

cpan/Math-BigInt/lib/Math/BigInt/Calc.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use warnings;
77
use Carp qw< carp croak >;
88
use Math::BigInt::Lib;
99

10-
our $VERSION = '1.999841';
10+
our $VERSION = '1.999842';
1111
$VERSION =~ tr/_//d;
1212

1313
our @ISA = ('Math::BigInt::Lib');

cpan/Math-BigInt/lib/Math/BigInt/Lib.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use 5.006001;
44
use strict;
55
use warnings;
66

7-
our $VERSION = '1.999841';
7+
our $VERSION = '1.999842';
88
$VERSION =~ tr/_//d;
99

1010
use Carp;

0 commit comments

Comments
 (0)