Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 7de07f3

Browse files
committed
Math-BigRat: Update to 0.2613
Fix problem with second operand being changed in multiplication (CPAN RT #121139). And keep our cperl test fixes. See github.com:rurban/Math-BigRat branch cperl
1 parent 36cb323 commit 7de07f3

File tree

7 files changed

+41
-5
lines changed

7 files changed

+41
-5
lines changed

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,6 +1756,7 @@ cpan/Math-BigRat/t/bitwise.t Math::BigRat test
17561756
cpan/Math-BigRat/t/hang.t Math::BigRat test for bug #34584 - hang in exp()
17571757
cpan/Math-BigRat/t/Math/BigRat/Test.pm Math::BigRat test helper
17581758
cpan/Math-BigRat/t/requirer.t see if require works properly
1759+
cpan/Math-BigRat/t/rt121139.t Math::BigRat test for bug rt #121139
17591760
cpan/Math-BigRat/t/trap.t see if trap_nan and trap_inf work
17601761
cpan/Math-Complex/lib/Math/Complex.pm A Complex package
17611762
cpan/Math-Complex/lib/Math/Trig.pm A simple interface to complex trigonometry

Porting/Maintainers.pl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ package Maintainers;
10111011
},
10121012

10131013
'Math::BigRat' => {
1014-
'DISTRIBUTION' => 'PJACKLAM/Math-BigRat-0.2612.tar.gz',
1014+
'DISTRIBUTION' => 'PJACKLAM/Math-BigRat-0.2613.tar.gz',
10151015
'FILES' => q[cpan/Math-BigRat],
10161016
'EXCLUDED' => [
10171017
qr{^inc/},
@@ -1022,6 +1022,12 @@ package Maintainers;
10221022
t/03podcov.t
10231023
),
10241024
],
1025+
'CUSTOMIZED' => [
1026+
qw( t/bigfltpm.inc
1027+
t/bigfltrt.t
1028+
t/bigratpm.t
1029+
),
1030+
],
10251031
},
10261032

10271033
'Math::Complex' => {

cpan/Math-BigRat/lib/Math/BigRat.pm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use Carp ();
2020

2121
use Math::BigFloat 1.999718;
2222

23-
our $VERSION = '0.2612';
23+
our $VERSION = '0.2613';
2424

2525
our @ISA = qw(Math::BigFloat);
2626

@@ -887,9 +887,11 @@ sub bmul {
887887
my $gcd_sq = $LIB -> _gcd($LIB -> _copy($y->{_n}), $x->{_d});
888888

889889
$x->{_n} = $LIB -> _mul(scalar $LIB -> _div($x->{_n}, $gcd_pr),
890-
scalar $LIB -> _div($y->{_n}, $gcd_sq));
890+
scalar $LIB -> _div($LIB -> _copy($y->{_n}),
891+
$gcd_sq));
891892
$x->{_d} = $LIB -> _mul(scalar $LIB -> _div($x->{_d}, $gcd_sq),
892-
scalar $LIB -> _div($y->{_d}, $gcd_pr));
893+
scalar $LIB -> _div($LIB -> _copy($y->{_d}),
894+
$gcd_pr));
893895

894896
# compute new sign
895897
$x->{sign} = $x->{sign} eq $y->{sign} ? '+' : '-';

cpan/Math-BigRat/t/rt121139.t

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!perl
2+
3+
# check for cpan rt #121139
4+
5+
use strict;
6+
use warnings;
7+
use Test::More tests => 2;
8+
use Math::BigRat;
9+
10+
my $a = Math::BigRat->new('3/2');
11+
my $x = Math::BigRat->new('2/3');
12+
is("$a", "3/2");
13+
14+
my $y = $a;
15+
$y = $x * $y;
16+
is("$a", "3/2");

dist/Module-CoreList/lib/Module/CoreList.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14975,6 +14975,8 @@ our %delta = (
1497514975
'JSON::PP' => '2.94_01',
1497614976
'JSON::PP::Boolean' => '2.94_01',
1497714977
'Locale::Codes' => '3.53',
14978+
'Math::BigRat' => '0.2613',
14979+
'Memoize' => '1.03',
1497814980
'Net::Ping' => '2.61',
1497914981
'Search::Dict' => '1.07_01',
1498014982
'SelectSaver' => '1.02_01',
@@ -15149,6 +15151,7 @@ our %delta = (
1514915151
'JSON::PP::Boolean' => '2.94_01',
1515015152
'Locale::Codes' => '3.53',
1515115153
'Opcode' => '1.39_02c',
15154+
'Math::BigRat' => '0.2613',
1515215155
'Metamodel' => '',
1515315156
'Mu' => '0.01c',
1515415157
'Net::Ping' => '2.61',

pod/perlcdelta.pod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,11 @@ Various, see L<https://metacpan.org/changes/distribution/JSON-PP>
401401

402402
Fixed the default error condition in legacy modules.
403403

404+
=item L<Math::BigRat> 0.2613
405+
406+
Fix problem with second operand being changed in multiplication (CPAN
407+
RT #121139).
408+
404409
=item L<Memoize> 1.03
405410

406411
Skip flapping, timer-sensitive t/expmod_t.t tests

t/porting/customized.dat

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ Math::BigInt cpan/Math-BigInt/t/sub_mif.t e87738bd15116665c38d9f41b310cfe7fbf6da
100100
Math::BigInt cpan/Math-BigInt/t/upgrade.t 7c15cac7f321ca396648ec45da6389a1283e1546
101101
Math::BigInt cpan/Math-BigInt/t/upgradef.t 06610e9883ce805bcd6543ab959a9826f598eb40
102102
Math::BigInt cpan/Math-BigInt/t/with_sub.t c040328e223df6f56250f5d67dcb2c9a2f23c110
103+
Math::BigRat cpan/Math-BigRat/t/bigfltpm.inc 8000c7057453138ff48cf4cba61f0f4a1db2b59a
104+
Math::BigRat cpan/Math-BigRat/t/bigfltrt.t 5508d55216c52caf26aa2e6478691c50b7856e7d
105+
Math::BigRat cpan/Math-BigRat/t/bigratpm.t cfd770aabeaf6b742fd942143e816db42db04fba
103106
Memoize cpan/Memoize/t/expmod_t.t 9386100cd9c95a0e8a4e001bba3aa52eec114d21
104-
Module::CoreList dist/Module-CoreList/lib/Module/CoreList.pm 1b7766aaebc990aad7ade7d4cd33dff1fd0749ee
107+
Module::CoreList dist/Module-CoreList/lib/Module/CoreList.pm fc70f5045950d5b51cc5426d5e9e4f79c794e437
105108
Module::CoreList dist/Module-CoreList/lib/Module/CoreList/Utils.pm 7ff05ce5f0b967d229b90870de806ce3fea82b22
106109
Module::Metadata cpan/Module-Metadata/t/lib/GeneratePackage.pm 502ffbe2609947430e6aa1a3df8064b3fef3e086
107110
Net::Domain cpan/libnet/lib/Net/Cmd.pm 70a007c38833667ad47ea8059c37c1b7d1c77b6c

0 commit comments

Comments
 (0)