😊
[Bug #21831]
[Bug #21831] Prism doesn't count underscores in the fraction part of rational float
- 次のように有理数リテラルの場合に小数部に
_があるとPrismで正しく定義されないというバグ報告
p 0.1_2r.to_f
# Prism => 0.012
# parse.y => 0.12
- この不具合は Ruby 4.0.1 で修正済み
p 0.1_2r.to_f
# Ruby 4.0.0 Prism => 0.012
# Ruby 4.0.1 Prism => 0.12
Discussion