Project

General

Profile

Actions

Bug #21137

closed

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

Added by kinoppyd (Yasuhiro Kinoshita) about 2 months ago. Updated 2 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 - Bug #21139: Prism and parse.y parses `it = it` differentlyAssignedprismActions
Has duplicate Ruby - 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) about 2 months 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) about 2 months ago

  • Assignee set to prism
Actions #3

Updated by kddnewton (Kevin Newton) about 2 months 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) about 2 months 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) about 2 months 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) about 1 month ago

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

Updated by nagachika (Tomoyuki Chikanaga) 2 days ago

  • Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: DONE to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: WONTFIX, 3.4: DONE
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0