[ruby-core:121045] [Ruby master Bug#21137] Compound assignment operator with "it" parsed differently between parse.y and prism
From:
"nobu (Nobuyoshi Nakada) via ruby-core" <ruby-core@...>
Date:
2025-02-14 10:10:15 UTC
List:
ruby-core #121045
Issue #21137 has been updated by nobu (Nobuyoshi Nakada).
Assignee set to prism
----------------------------------------
Bug #21137: Compound assignment operator with "it" parsed differently between parse.y and prism
https://bugs.ruby-lang.org/issues/21137#change-111956
* Author: kinoppyd (Yasuhiro Kinoshita)
* Status: Open
* Assignee: prism
* ruby -v: ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin21]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
``` ruby
# 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 }
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/