Actions
Bug #20784
closed`?\` followed by EOF is parsed wrong
Status:
Closed
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
Updated by tompng (tomoya ishida) about 2 months ago
Actions
Like0
Like0Like0