Skip to content

Commit a32b429

Browse files
committed
Add a test for Rat.perl.EVAL round tripping with arbitrary numerator & denomator
As of the latest Rakudo this leads to an error of the form: ===SORRY!=== Cannot find method 'compile_time_value' See https://rt.perl.org/Ticket/Display.html?id=126873 for the original report.
1 parent 4b689b3 commit a32b429

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

S32-num/rat.t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ is( (1/10).perl, "0.1", '(1/10).perl is 0.1' );
2424
is( (1/5).perl, "0.2", '(1/5).perl is .2' );
2525
is( (1/2).perl, "0.5", '(1/2).perl is .5' );
2626
is 1/128, (1/128).perl.EVAL, '(1/128).perl.EVAL round trips with sufficient accuracy';
27+
is 1/128, (1/128).perl.EVAL, '(1/128).perl.EVAL round trips with sufficient accuracy';
28+
# RT #126873
29+
is(Rat.new(807412079564, 555).perl.EVAL, Rat.new(807412079564, 555), '807412079564/555 round trips without a compile_time_value error');
2730

2831
# Test ~
2932
is(~(Rat.new(1,4)), ~(0.25e0), "Rats stringify properly");

0 commit comments

Comments
 (0)