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

off-by-one in the error message when a sign is present in parse-base ( ‘-5.2 #5875

Closed
p6rt opened this issue Dec 8, 2016 · 4 comments
Closed
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Dec 8, 2016

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

Searchable as RT130298$

@p6rt
Copy link
Author

p6rt commented Dec 8, 2016

From @AlexDaniel

Code​:
�-5.2�5�.parse-base(10)

Result​:
Invalid base-10 character '5'​: 5.2ð��©â��5. Please use one of 0..9
  in block <unit> at -e line 1

Actually thrown at​:
  in block <unit> at -e line 1

It says �5� is the invalid character when in reality poo is invalid.

Code​:
�-5.2z�.parse-base(10)

Result​:
Invalid base-10 character ''​: 5.2zâ��. Please use one of 0..9
  in block <unit> at -e line 1

Actually thrown at​:
  in block <unit> at -e line 1

And here it complains about the empty string :)

@p6rt
Copy link
Author

p6rt commented Dec 9, 2016

From @zoffixznet

On Thu, 08 Dec 2016 03​:41​:32 -0800, alex.jakimenko@​gmail.com wrote​:

Code​:
�-5.2�5�.parse-base(10)

Result​:
Invalid base-10 character '5'​: 5.2ðÂ�Â�©âÂ�Â�5. Please use one of 0..9
in block <unit> at -e line 1

Actually thrown at​:
in block <unit> at -e line 1

It says �5� is the invalid character when in reality poo is invalid.

Code​:
�-5.2z�.parse-base(10)

Result​:
Invalid base-10 character ''​: 5.2zâÂ�Â�. Please use one of 0..9
in block <unit> at -e line 1

Actually thrown at​:
in block <unit> at -e line 1

And here it complains about the empty string :)

Fix​: rakudo/rakudo@8e3cbc67db
Test​: Raku/roast@33edc14e71

@p6rt
Copy link
Author

p6rt commented Dec 9, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Dec 9, 2016

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Dec 9, 2016
@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant