Actions
Bug #20784
open`?\` followed by EOF is parsed wrong
Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby -v: ruby 3.4.0dev (2024-10-05T02:36:21Z master e939f28cc9) +YJIT +MN +PRISM [arm64-darwin22]
Description
?\
at EOF should be syntax error
% printf "p ?\\" | ruby --parser=parse.y
[nothing shown]
% printf "1 in a ?\\" | ruby --parser=parse.y -c
Syntax OK
With --parser=prism
, ?\
at EOF is parsed as empty string, reported in https://github.com/ruby/prism/issues/3144
Actions
Like0
Like0