Actions
Bug #21186
closedInconsistent parsing of ?あand 0
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.5.0dev (2025-03-16T03:09:18Z master 06919949a6) +PRISM [x86_64-linux]
Description
?あand 0
has inconsistent behavior between Prism and parse.y.
% ./miniruby --parser=parse.y -e "?aand 0"
-e:1: syntax error, unexpected '?'
?aand 0
./miniruby: compile error (SyntaxError)
% ./miniruby --parser=parse.y -e "?あand 0"
% ./miniruby --parser=prism -e "?aand 0"
-e: -e:1: syntax error found (SyntaxError)
> 1 | ?aand 0
| ^ unexpected '?', ignoring it
% ./miniruby --parser=prism -e "?あand 0"
-e: -e:1: syntax error found (SyntaxError)
> 1 | ?あand 0
| ^ unexpected '?', ignoring it
% ./miniruby --parser=parse.y -e "?\caand 0"
% ./miniruby --parser=prism -e "?\caand 0"
parse.y | Prism | |
---|---|---|
?aand 0 |
x | x |
?あand 0 |
x | |
?\caand 0 |
Updated by qnighy (Masaki Hara) 16 days ago
- Description updated (diff)
Added comparison with escaped chars
Updated by nobu (Nobuyoshi Nakada) 14 days ago
- Status changed from Open to Closed
Applied in changeset git|1acfb29015dbc38fd345d8786aa78aad59f7dcd1.
[Bug #21186] multibyte char literal should be a single letter word
Updated by nobu (Nobuyoshi Nakada) 14 days ago
- Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED
Updated by alanwu (Alan Wu) 4 days ago
- Backport changed from 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED to 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED, 3.4: DONE
3.4 backport is done. 8b491169c32621d4e74324eed08465448dfc54d5
Updated by nagachika (Tomoyuki Chikanaga) 3 days ago
- Backport changed from 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED, 3.4: DONE to 3.1: REQUIRED, 3.2: REQUIRED, 3.3: DONE, 3.4: DONE
ruby_3_3 770060f7662698ca74bc28428919a688b8fe06d2 merged revision(s) 1acfb29015dbc38fd345d8786aa78aad59f7dcd1.
Actions
Like0
Like0Like0Like0Like0Like0