Project

General

Profile

Actions

Bug #21137

closed

Compound assignment operator with "it" parsed differently between parse.y and prism

Added by kinoppyd (Yasuhiro Kinoshita) 8 days ago. Updated 8 days ago.

Status:
Closed
Assignee:
Target version:
-
ruby -v:
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin21]
[ruby-core:121041]

Description

# parse.y OK: no error
# prism   OK: no error
proc { it = 1 }

# parse.y OK: no error
# prism   OK: no error
proc { it = it + 1 }

# parse.y OK: no error
# prism   NG: syntax errors found (SyntaxError)
proc { it += 1 }

Related issues 2 (1 open1 closed)

Related to Ruby master - Bug #21139: Prism and parse.y parses `it = it` differentlyAssignedprismActions
Has duplicate Ruby master - Bug #21138: The modifier expression with "it" is parsed differently in parse.y and Prism, which is unexpected in both.ClosedprismActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0