New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
infix:<%> gives fewer divide-by-zero errors than does infix:</> in Rakudo #2125
Comments
From @masak<alksentrs> rakudo: say 1 % 0 |
From @ShimmerFairyProperly fails now: <lue> r: say 1 % 0 A test for this is in ../roast/S03-operators/arith.t, as well as similar tests for %% in ../roast/S03-operators/is-divisible-by.t. Can be closed unless more tests are desired. |
The RT System itself - Status changed from 'new' to 'open' |
From @usev6As it was said before, infix:<%> now gives the same divide-by-zero errors as infix:</>. In roast we currently only test with 'dies_ok' and 'eval_dies_ok'. On #perl6 it was pointed out by psch++ two days ago that we don't fail directly with X::Numeric::DivideByZero, but with X::TypeCheck::Return (or X::Typecheck::Assignment): <psch> right On a related note: 'say 0 / 0' fails differently than the other three: $ perl6 -e 'my $x = do { CATCH { default { say .perl } }; ( 0 / 0 ).Int };' $ perl6 -e 'my $x = do { CATCH { default { say .perl } }; ( 1 / 0 ).Int };' $ perl6 -e 'my $x = do { CATCH { default { say .perl } }; ( 0 % 0 ).Int };' $ perl6 -e 'my $x = do { CATCH { default { say .perl } }; ( 1 % 0 ).Int };' IMHO that meets the requirements of this ticket. So I'd vote for "closable (maybe after tweaking the tests to reflect the typed exceptions)". |
1 similar comment
From @usev6As it was said before, infix:<%> now gives the same divide-by-zero errors as infix:</>. In roast we currently only test with 'dies_ok' and 'eval_dies_ok'. On #perl6 it was pointed out by psch++ two days ago that we don't fail directly with X::Numeric::DivideByZero, but with X::TypeCheck::Return (or X::Typecheck::Assignment): <psch> right On a related note: 'say 0 / 0' fails differently than the other three: $ perl6 -e 'my $x = do { CATCH { default { say .perl } }; ( 0 / 0 ).Int };' $ perl6 -e 'my $x = do { CATCH { default { say .perl } }; ( 1 / 0 ).Int };' $ perl6 -e 'my $x = do { CATCH { default { say .perl } }; ( 0 % 0 ).Int };' $ perl6 -e 'my $x = do { CATCH { default { say .perl } }; ( 1 % 0 ).Int };' IMHO that meets the requirements of this ticket. So I'd vote for "closable (maybe after tweaking the tests to reflect the typed exceptions)". |
From @lizmatFWIW, I think almost *all* dies_ok and eval_dies_ok should be eradicated from roast. The generate way too many false positives. Should probably be all converted to throws_like. Liz On 23 Nov 2014, at 23:10, Christian Bartolomaeus via RT <bugs-comment@bugs6.perl.org> wrote:
|
From @usev6On Sun Nov 23 14:32:43 2014, elizabeth wrote:
Hah! On that note I went ahead and changed those 'dies_ok' and 'eval_dies_ok' to more specific tests -- see commit Raku/roast@d025d6c4a7 If the new tests are too specific (or if there are too many of them), please feel free to modify the tests or reopen the ticket. (Which I'm closing now.) Christian |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#77592 (status was 'resolved')
Searchable as RT77592$
The text was updated successfully, but these errors were encountered: