ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:121376]  [Ruby Bug#21186] Inconsistent parsing of ?あand 0
@ 2025-03-16  5:13 qnighy (Masaki Hara) via ruby-core
  2025-03-16  7:20 ` [ruby-core:121379] " qnighy (Masaki Hara) via ruby-core
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: qnighy (Masaki Hara) via ruby-core @ 2025-03-16  5:13 UTC (permalink / raw)
  To: ruby-core; +Cc: qnighy (Masaki Hara)

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:121379]  [Ruby Bug#21186] Inconsistent parsing of ?あand 0
  2025-03-16  5:13 [ruby-core:121376] [Ruby Bug#21186] Inconsistent parsing of ?あand 0 qnighy (Masaki Hara) via ruby-core
@ 2025-03-16  7:20 ` qnighy (Masaki Hara) via ruby-core
  2025-03-27 21:57 ` [ruby-core:121460] " alanwu (Alan Wu) via ruby-core
  2025-03-29  6:59 ` [ruby-core:121471] " nagachika (Tomoyuki Chikanaga) via ruby-core
  2 siblings, 0 replies; 4+ messages in thread
From: qnighy (Masaki Hara) via ruby-core @ 2025-03-16  7:20 UTC (permalink / raw)
  To: ruby-core; +Cc: qnighy (Masaki Hara)

Issue #21186 has been updated by qnighy (Masaki Hara).

Description updated

Added comparison with escaped chars

----------------------------------------
Bug #21186: Inconsistent parsing of ?あand 0
https://bugs.ruby-lang.org/issues/21186#change-112350

* 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

% ./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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:121460]  [Ruby Bug#21186] Inconsistent parsing of ?あand 0
  2025-03-16  5:13 [ruby-core:121376] [Ruby Bug#21186] Inconsistent parsing of ?あand 0 qnighy (Masaki Hara) via ruby-core
  2025-03-16  7:20 ` [ruby-core:121379] " qnighy (Masaki Hara) via ruby-core
@ 2025-03-27 21:57 ` alanwu (Alan Wu) via ruby-core
  2025-03-29  6:59 ` [ruby-core:121471] " nagachika (Tomoyuki Chikanaga) via ruby-core
  2 siblings, 0 replies; 4+ messages in thread
From: alanwu (Alan Wu) via ruby-core @ 2025-03-27 21:57 UTC (permalink / raw)
  To: ruby-core; +Cc: alanwu (Alan Wu)

Issue #21186 has been updated by alanwu (Alan Wu).

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. commit:8b491169c32621d4e74324eed08465448dfc54d5

----------------------------------------
Bug #21186: Inconsistent parsing of ?あand 0
https://bugs.ruby-lang.org/issues/21186#change-112463

* 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: REQUIRED, 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:121471]  [Ruby Bug#21186] Inconsistent parsing of ?あand 0
  2025-03-16  5:13 [ruby-core:121376] [Ruby Bug#21186] Inconsistent parsing of ?あand 0 qnighy (Masaki Hara) via ruby-core
  2025-03-16  7:20 ` [ruby-core:121379] " qnighy (Masaki Hara) via ruby-core
  2025-03-27 21:57 ` [ruby-core:121460] " alanwu (Alan Wu) via ruby-core
@ 2025-03-29  6:59 ` nagachika (Tomoyuki Chikanaga) via ruby-core
  2 siblings, 0 replies; 4+ messages in thread
From: nagachika (Tomoyuki Chikanaga) via ruby-core @ 2025-03-29  6:59 UTC (permalink / raw)
  To: ruby-core; +Cc: nagachika (Tomoyuki Chikanaga)

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-29  7:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-16  5:13 [ruby-core:121376] [Ruby Bug#21186] Inconsistent parsing of ?あand 0 qnighy (Masaki Hara) via ruby-core
2025-03-16  7:20 ` [ruby-core:121379] " qnighy (Masaki Hara) via ruby-core
2025-03-27 21:57 ` [ruby-core:121460] " alanwu (Alan Wu) via ruby-core
2025-03-29  6:59 ` [ruby-core:121471] " nagachika (Tomoyuki Chikanaga) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).