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) 23 days ago. Updated 6 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) 22 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) 22 days ago Actions #2

  • Status changed from Open to Closed

Applied in changeset git|d8444812f42162567502877ff3665105a960eb60.


[Bug #22124] Add block to the proper node

Updated by rwstauner (Randy Stauner) 19 days ago Actions #3 [ruby-core:125852]

Backport PR for ruby_4_0 (4.0) opened: https://github.com/ruby/ruby/pull/17512

Updated by k0kubun (Takashi Kokubun) 6 days ago Actions #4 [ruby-core:126000]

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

ruby_4_0 commit:48ac72683a62a7b6b0b7f1e86700eb8688631d86 merged revision(s) commit:d8444812f42197ea13bd9e7762f4e5403484613e, commit:48ac72683a62a7b6b0b7f1e86700eb8688631d86.

Actions

Also available in: PDF Atom