ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/CBOR-XS/XS.pm
(Generate patch)

Comparing CBOR-XS/XS.pm (file contents):
Revision 1.59 by root, Tue Apr 26 16:25:49 2016 UTC vs.
Revision 1.60 by root, Tue Apr 26 16:26:24 2016 UTC

1206} 1206}
1207 1207
1208sub Math::BigRat::TO_CBOR { 1208sub Math::BigRat::TO_CBOR {
1209 my ($n, $d) = $_[0]->parts; 1209 my ($n, $d) = $_[0]->parts;
1210 1210
1211 # older versions of BigRat need *=1, as they not always return numbers 1211 # older versions of BigRat need *1, as they not always return numbers
1212 1212
1213 $d*1 == 1 1213 $d*1 == 1
1214 ? $n*1 1214 ? $n*1
1215 : tag 30, [$n*1, $d*1] 1215 : tag 30, [$n*1, $d*1]
1216} 1216}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines