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

Rewrite specs for String#to_c with special float values #1250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Feb 27, 2025

The old description said it understands these values, but this is not true. The only reasons Infinity get parsed as non-zero is because it starts with an "I", which is interpreted as 1i and that's where the parsing stops. Any other word that starts with an "I" behaves the same.

The name "special float values" has been borrowed from the string/to_f_spec.rb

The old description said it understands these values, but this is not
true. The only reasons Infinity get parsed as non-zero is because it
starts with an "I", which is interpreted as 1i and that's where the
parsing stops. Any other word that starts with an "I" behaves the same.

The name "special float values" has been borrowed from the
string/to_f_spec.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant