Skip to content

Accept no digits in the fractional part#302

Merged
mrkn merged 1 commit intoruby:masterfrom
kou:accept-no-number-after-dot
Oct 10, 2024
Merged

Accept no digits in the fractional part#302
mrkn merged 1 commit intoruby:masterfrom
kou:accept-no-number-after-dot

Conversation

@kou
Copy link
Copy Markdown
Member

@kou kou commented Sep 5, 2024

fix #301

For example, "0.E-9" and "0." are accepted.

FYI:

Float()/.to_f will accept "0.E-9":
https://bugs.ruby-lang.org/issues/20705

The current Float doesn't accept "0." but .to_f accepts "0.".

@kou kou requested a review from mrkn September 6, 2024 02:20
@kou
Copy link
Copy Markdown
Member Author

kou commented Oct 3, 2024

@mrkn What do you think about this?

@mrkn
Copy link
Copy Markdown
Member

mrkn commented Oct 3, 2024

@kou I'm in favor of this change, but I want to merge this after Ruby's [Feature #20705] is closed.

@kou
Copy link
Copy Markdown
Member Author

kou commented Oct 9, 2024

@mrkn The ticket was closed.

fix ruby#301

For example, "0.E-9" and "0." are accepted.

FYI:

`Float()`/`.to_f` will accept "0.E-9":
https://bugs.ruby-lang.org/issues/20705

The current `Float` doesn't accept "0." but `.to_f` accepts "0.".
@mrkn mrkn force-pushed the accept-no-number-after-dot branch from 69e80ff to e01ff7e Compare October 10, 2024 06:30
@mrkn mrkn merged commit 66868ab into ruby:master Oct 10, 2024
@mrkn
Copy link
Copy Markdown
Member

mrkn commented Oct 10, 2024

@kou Thank you very much!

@kou kou deleted the accept-no-number-after-dot branch October 10, 2024 09:31
@kou
Copy link
Copy Markdown
Member Author

kou commented Dec 15, 2024

@mrkn Do you want to release a new version with this so that Ruby 3.4.0 and BigDecimal() use the same behavior.

@mrkn
Copy link
Copy Markdown
Member

mrkn commented Dec 15, 2024 via email

@mrkn
Copy link
Copy Markdown
Member

mrkn commented Dec 25, 2024

@kou The new version was shipped.

@kou
Copy link
Copy Markdown
Member Author

kou commented Dec 25, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot parse '0.E-9'

2 participants