- Notifications
You must be signed in to change notification settings - Fork 173
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Endless method definition with block inside while condition is parsed different from Ruby.
while def f = g do end (syntax error in ruby) is parsed without error.
while def f = g do end; end (syntax ok in ruby) fails to parse.
eval('while def f = g do end') # => syntax error, unexpected end-of-input, expecting `do' for condition or ';' or '\n' (SyntaxError) Prism.parse('while def f = g do end').success? # => true eval('while def f = g do end; end') # => infinite loop Prism.parse('while def f = g do end; end').success? # => falseMetadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working