From: "nagachika (Tomoyuki Chikanaga) via ruby-core" Date: 2025-03-29T06:59:10+00:00 Subject: [ruby-core:121471] [Ruby Bug#21186] Inconsistent parsing of ?あand 0 Issue #21186 has been updated by nagachika (Tomoyuki Chikanaga). 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 commit:770060f7662698ca74bc28428919a688b8fe06d2 merged revision(s) commit:1acfb29015dbc38fd345d8786aa78aad59f7dcd1. ---------------------------------------- Bug #21186: Inconsistent parsing of ?���and 0 https://bugs.ruby-lang.org/issues/21186#change-112478 * Author: qnighy (Masaki Hara) * Status: Closed * ruby -v: ruby 3.5.0dev (2025-03-16T03:09:18Z master 06919949a6) +PRISM [x86_64-linux] * Backport: 3.1: REQUIRED, 3.2: REQUIRED, 3.3: DONE, 3.4: DONE ---------------------------------------- `?���and 0` has inconsistent behavior between Prism and parse.y. ```console % ./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` | | | -- 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/lists/ruby-core.ml.ruby-lang.org/