Project

General

Profile

Actions

Bug #20790

open

Syntax acceptance of `*x = p rescue p 1` is different between parse.y and prism

Added by tompng (tomoya ishida) about 1 month ago. Updated 13 days ago.

Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby 3.4.0dev (2024-10-09T03:27:05Z master ed11a244dd) +PRISM [x86_64-linux]
[ruby-core:119488]

Description

*x = p rescue p 1 # syntax error in prism
*x = p 1 rescue p 1 # both syntax ok
x = p rescue p 1 # both syntax error
x = p 1 rescue p 1 # both syntax ok

Which is correct? If *x = p rescue p 1 is syntax valid, should x = p rescue p 1 also be syntax valid?


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #8279: Single-line rescue parsingClosedmatz (Yukihiro Matsumoto)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0