Project

General

Profile

Actions

Bug #21139

open

Prism and parse.y parses `it = it` differently

Added by tompng (tomoya ishida) 8 days ago. Updated 8 days ago.

Status:
Assigned
Assignee:
Target version:
-
ruby -v:
ruby 3.5.0dev (2025-02-14T16:49:52Z master ee181d1bb7) +PRISM [x86_64-linux]
[ruby-core:121054]

Description

# ruby --parser=parse.y -e "42.tap { it = it; p it }"
nil
# ruby --parser=prism -e "42.tap { it = it; p it }"
42

Related issues 2 (0 open2 closed)

Related to Ruby master - Bug #21137: Compound assignment operator with "it" parsed differently between parse.y and prismClosedprismActions
Related to 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
Like0Like0Like0Like0