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 8 hours 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.
Actions