Skip to content
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

Rat of 1/0 makes say silently fail #1269

Closed
p6rt opened this issue Sep 2, 2009 · 5 comments
Closed

Rat of 1/0 makes say silently fail #1269

p6rt opened this issue Sep 2, 2009 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Sep 2, 2009

Migrated from rt.perl.org#68960 (status was 'resolved')

Searchable as RT68960$

@p6rt
Copy link
Author

p6rt commented Sep 2, 2009

From @colomon

colomon​: rakudo​: say "hello"; say 1 / 0; say "goodbye"
p6eval​: rakudo c9a930​: OUTPUT«hello␤goodbye␤»

Note that this has two outputs, not three. The "say 1 / 0;" silently fails.

colomon​: rakudo​: say "hello"; say (1 / 0).Str; say "goodbye"
p6eval​: rakudo c9a930​: OUTPUT«hello␤Divide by zero␤»

Whereas adding an explicit call to Str yields a divide-by-zero error.

--
Solomon Foster​: colomon@​gmail.com
HarmonyWare, Inc​: http://www.harmonyware.com

@p6rt
Copy link
Author

p6rt commented Sep 23, 2009

From @masak

<masak> rakudo​: say 1/0; say "Alive"; say (1/0).Num
<p6eval> rakudo 0eaf62​: OUTPUT«Alive␤Divide by zero␤»
<masak> note that the first &say call doesn't print anything.
<masak> not even a newline.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Apr 23, 2010

From @moritz

Now properly coerces to +-Inf. Tested in S32-num/rat.t

@p6rt
Copy link
Author

p6rt commented Apr 23, 2010

@moritz - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Apr 23, 2010
@p6rt
Copy link
Author

p6rt commented Apr 23, 2010

From @bbkr

[17​:07] <bbkr> rakudo​: say 1/0; say "Alive"; say (1/0).Num #
http://rt.perl.org/rt3/Ticket/Display.html?id=68960 looks like fixed
now, Rat() returns Inf
[17​:07] <p6eval> rakudo 6783b5​: OUTPUT«Inf␤Alive␤Inf␤»
[17​:08] <moritz_> aye
[17​:08] <moritz_> just needs testing
[17​:08] <masak> maybe assign it to moritz_, then?
[17​:09] <moritz_> oh, actually it has tests alrready, in S32-num/rat.t

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant