From: "qnighy (Masaki Hara) via ruby-core" Date: 2025-03-16T05:13:24+00:00 Subject: [ruby-core:121376] [Ruby Bug#21186] Inconsistent parsing of ?あand 0 Issue #21186 has been reported by qnighy (Masaki Hara). ---------------------------------------- Bug #21186: Inconsistent parsing of ?���and 0 https://bugs.ruby-lang.org/issues/21186 * Author: qnighy (Masaki Hara) * Status: Open * ruby -v: ruby 3.5.0dev (2025-03-16T03:09:18Z master 06919949a6) +PRISM [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- `?���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 ``` | |parse.y|Prism| |----------|-------|-----| |`?aand 0` | x | x | |`?���and 0`| | x | -- 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/