From: "nagachika (Tomoyuki Chikanaga) via ruby-core" Date: 2023-07-22T04:16:28+00:00 Subject: [ruby-core:114259] [Ruby master Bug#19743] Ruby's parser seems to ignoring DOT at the end of file just after digits 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/ ______________________________________________ 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/postorius/lists/ruby-core.ml.ruby-lang.org/