Closed makenowjust closed 1 week ago
Example code:
("a":)
Ruby:
-e:1: syntax error, unexpected tLABEL_END, expecting literal content or terminator or tSTRING_DBEG or tSTRING_DVAR ("a":)
Prism:
@ ProgramNode (location: (1,0)-(1,6)) ├── flags: ∅ ├── locals: [] └── statements: @ StatementsNode (location: (1,0)-(1,6)) ├── flags: ∅ └── body: (length: 1) └── @ ParenthesesNode (location: (1,0)-(1,6)) ├── flags: newline ├── body: │ @ StatementsNode (location: (1,1)-(1,5)) │ ├── flags: ∅ │ └── body: (length: 1) │ └── @ SymbolNode (location: (1,1)-(1,5)) │ ├── flags: newline, static_literal, forced_us_ascii_encoding │ ├── opening_loc: (1,1)-(1,2) = "\"" │ ├── value_loc: (1,2)-(1,3) = "a" │ ├── closing_loc: (1,3)-(1,5) = "\":" │ └── unescaped: "a" ├── opening_loc: (1,0)-(1,1) = "(" └── closing_loc: (1,5)-(1,6) = ")"
and ruby --parser=prism -e 'x = ("a":); p x' shows :a actually.
ruby --parser=prism -e 'x = ("a":); p x'
:a
This bug is found by Lernen. Automata learning is real!
Bug report
Example code:
Ruby:
Prism:
and
ruby --parser=prism -e 'x = ("a":); p x'
shows:a
actually.Bonus note
This bug is found by Lernen. Automata learning is real!