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 #1

Updated by nobu (Nobuyoshi Nakada) 8 days ago

  • Has duplicate Bug #21138: The modifier expression with "it" is parsed differently in parse.y and Prism, which is unexpected in both. added

Updated by nobu (Nobuyoshi Nakada) 8 days ago

  • Assignee set to prism
Actions #3

Updated by kddnewton (Kevin Newton) 8 days ago

  • Status changed from Open to Closed

Applied in changeset git|ee181d1bb74ef82d6507c411a6aff10d1bf37aa3.


[ruby/prism] Fix up it indirect writes

Fixes [Bug #21137]

https://github.com/ruby/prism/commit/ca493e6797

Actions #4

Updated by kddnewton (Kevin Newton) 8 days ago

  • Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: REQUIRED

Updated by k0kubun (Takashi Kokubun) 8 days ago

  • Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: REQUIRED to 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: DONE
Actions #6

Updated by nobu (Nobuyoshi Nakada) 7 days ago

  • Related to Bug #21139: Prism and parse.y parses `it = it` differently added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0