Actions
Bug #21831
closedPrism doesn't count underscores in the fraction part of rational float
Bug #21831:
Prism doesn't count underscores in the fraction part of rational float
Description
Good.
$ ruby3.3 -e 'p 0.1_2r.to_f'
0.12
$ ruby3.4 --parser=parse.y -e 'p 0.1_2r.to_f'
0.12
Wrong.
$ ruby3.4 -e 'p 0.1_2r.to_f'
0.012
Updated by nobu (Nobuyoshi Nakada) about 1 month ago
- Status changed from Open to Closed
Applied in changeset git|8baaece6d9a64e8cc51d8d0c9839546e3d039eee.
[ruby/prism] Bug #21831 Fix denominator of rational float literal
Denominators can contain underscores in fraction part as well as other
numeric literals.
Updated by k0kubun (Takashi Kokubun) about 1 month ago
- Backport changed from 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED to 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED, 4.0: DONE
backported it to ruby_4_0 at https://github.com/ruby/ruby/pull/15856
Updated by Earlopain (Earlopain _) about 1 month ago
- Assignee set to prism
Actions