[ruby-core:113977] [Ruby master Bug#19743] Ruby's parser seems to ignoring DOT at the end of file just after digits

Issue #19743 has been reported by tompng (tomoya ishida). ---------------------------------------- Bug #19743: Ruby's parser seems to ignoring DOT at the end of file just after digits https://bugs.ruby-lang.org/issues/19743 * Author: tompng (tomoya ishida) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-06-19T09:28:10Z master 2a80bac9f0) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- I expect all to be syntax error ~~~ruby eval "puts 1." #=> 1 eval "puts 1. " #=> syntax error eval "puts 1.\n" #=> syntax error ~~~ For ripper, period token is missing ~~~ruby Ripper.tokenize("1.") #=> ["1"] Ripper.tokenize("1. ") #=> ["1", ".", " "] ~~~ -- https://bugs.ruby-lang.org/

Issue #19743 has been updated by nobu (Nobuyoshi Nakada). Backport changed from 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN to 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED Seems since 2.5. I tried bisecting 2.5 branch, but `configure` generated with recent autoconf doesn't work. ---------------------------------------- Bug #19743: Ruby's parser seems to ignoring DOT at the end of file just after digits https://bugs.ruby-lang.org/issues/19743#change-103662 * Author: tompng (tomoya ishida) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-06-19T09:28:10Z master 2a80bac9f0) [x86_64-linux] * Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED ---------------------------------------- I expect all to be syntax error ~~~ruby eval "puts 1." #=> 1 eval "puts 1. " #=> syntax error eval "puts 1.\n" #=> syntax error ~~~ For ripper, period token is missing ~~~ruby Ripper.tokenize("1.") #=> ["1"] Ripper.tokenize("1. ") #=> ["1", ".", " "] ~~~ -- https://bugs.ruby-lang.org/

Issue #19743 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED to 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONTNEED Since it's obviously a bug, it had been long-standing and fixing it could break executing existing script. I don't backport it to ruby_3_2 for now. Any opinion? ---------------------------------------- Bug #19743: Ruby's parser seems to ignoring DOT at the end of file just after digits https://bugs.ruby-lang.org/issues/19743#change-103950 * Author: tompng (tomoya ishida) * Status: Closed * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-06-19T09:28:10Z master 2a80bac9f0) [x86_64-linux] * Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONTNEED ---------------------------------------- I expect all to be syntax error ~~~ruby eval "puts 1." #=> 1 eval "puts 1. " #=> syntax error eval "puts 1.\n" #=> syntax error ~~~ For ripper, period token is missing ~~~ruby Ripper.tokenize("1.") #=> ["1"] Ripper.tokenize("1. ") #=> ["1", ".", " "] ~~~ -- https://bugs.ruby-lang.org/
participants (3)
-
nagachika (Tomoyuki Chikanaga)
-
nobu (Nobuyoshi Nakada)
-
tompng (tomoya ishida)