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

.base inconsistent with out of range args #2266

Closed
zoffixznet opened this Issue Sep 9, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@zoffixznet
Copy link
Contributor

zoffixznet commented Sep 9, 2018

Int.base fails, but Rat.base throws:

<Zoffix_> m: dd 1.base: 1
<camelia> rakudo-moar 3272207ae: OUTPUT: «Failure.new(exception => X::OutOfRange.new(what => "base argument to base", got => 1, range => "2..36", comment => Any), backtrace => Backtrace.new)␤»
<Zoffix_> m: dd 1.1.base: 1
<camelia> rakudo-moar 3272207ae: OUTPUT: «base argument to base out of range. Is: 1, should be in 2..36␤  in block <unit> at <tmp> line 1␤␤»

This issue was revealed during 6.d review of tests and there's already a now-fudged test for this issue at the bottom of this commit: perl6/roast@ee49319

(don't know a good rule for when we throw, but when we fail; 1[1] fails for the record)

xelak6 pushed a commit to xelak6/roast that referenced this issue Sep 9, 2018

[v6.d REVIEW] Use more precise routine for .base failures
Also fudge one test that revealed wrong behaviour:
R#2266 rakudo/rakudo#2266
Orig: perl6@e2039db

@zoffixznet zoffixznet self-assigned this Oct 19, 2018

zoffixznet added a commit that referenced this issue Oct 19, 2018

ugexe added a commit to perl6/roast that referenced this issue Dec 15, 2018

[v6.d REVIEW] Use more precise routine for .base failures
Also fudge one test that revealed wrong behaviour:
R#2266 rakudo/rakudo#2266
Orig: e2039db

ugexe added a commit to perl6/roast that referenced this issue Dec 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.