Project

General

Profile

Actions

Bug #22124

closed

void value missed in parse.y

Bug #22124: void value missed in parse.y

Added by kddnewton (Kevin Newton) 3 days ago. Updated 2 days ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:125803]

Description

$ ruby --parser=parse.y -cwe 'x = return a b do end'
Syntax OK
$ ruby --parser=prism -cwe 'x = return a b do end'
ruby: -e:1: syntax error found (SyntaxError)
> 1 | x = return a b do end
    |     ^~~~~~~~~~~~~~~~~ unexpected void value expression

I think it's likely because of the wrapped block expression.

Updated by nobu (Nobuyoshi Nakada) 2 days ago Actions #1 [ruby-core:125812]

  • Backport changed from 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN to 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED

Thanks, it looks a very old standing bug.

Updated by nobu (Nobuyoshi Nakada) 2 days ago Actions #2

  • Status changed from Open to Closed

Applied in changeset git|d8444812f42162567502877ff3665105a960eb60.


[Bug #22124] Add block to the proper node

Actions

Also available in: PDF Atom