crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.49k stars 1.62k forks source link

Clarify behavior of `strict` for `String`-to-number conversions #15199

Closed HertzDevil closed 6 days ago

HertzDevil commented 1 week ago

In table form:

whitespace: false whitespace: true
strict: false 1.2 1.2 1.2@@ 1.2 1.2 1.2@@
1.2 1.2 1.2@@
strict: true 1.2 1.2 1.2
1.2 1.2

The current wording suggests that the two arguments are mutually exclusive and cannot be both set to true, but the lower-right quadrant suggests otherwise. (Note that both whitespace and strict are also true by default.) This PR reflects the current status.