You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`a 1,next,1` has been a syntax error since at least Ruby 2.0:
```console
$ ruby -vce 'a 1,next,1'
ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin13.0.2]
-e:1: void value expression
a 1,next,1
^
```
The same goes for Ruby 3.3:
```console
$ ruby -vce 'a 1,next,1'
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]
-e:1: void value expression
a 1,next,1
-e:1: Invalid next
a 1,next,1
-e: compile error (SyntaxError)
```
Although the Parser gem is able to parse it, this is likely an unexpected behavior:
```console
$ ruby-parse --33 -e 'a 1,next,1'
(send nil :a
(int 1)
(next)
(int 1))
```
The issue regarding this is below:
whitequark/parser#995
There is an incompatibility in syntax errors for "void value expression" between Parser gem and Ruby.
Expected
a 1,break,1
has been a syntax error since at least Ruby 2.0:The same goes for Ruby 3.3:
Actual
Although the Parser gem is able to parse it, this is likely an unexpected behavior:
The same goes for
return
,next
, andredo
.The text was updated successfully, but these errors were encountered: