From: "nagachika (Tomoyuki Chikanaga) via ruby-core" Date: 2026-06-07T13:48:05+00:00 Subject: [ruby-core:125633] [Ruby Bug#21831] Prism doesn't count underscores in the fraction part of rational float Issue #21831 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED, 4.0: DONE to 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE, 4.0: DONE Backported into ruby_3_4 with https://github.com/ruby/ruby/pull/16324. ---------------------------------------- Bug #21831: Prism doesn't count underscores in the fraction part of rational float https://bugs.ruby-lang.org/issues/21831#change-117483 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Assignee: prism * Backport: 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE, 4.0: DONE ---------------------------------------- Good. ```console $ 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. ```console $ ruby3.4 -e 'p 0.1_2r.to_f' 0.012 ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/