From: mame@... Date: 2020-12-23T15:39:11+00:00 Subject: [ruby-core:101653] [Ruby master Bug#17431] paren_nest is not reset in parse.y after "foo.[]= value" Issue #17431 has been updated by mame (Yusuke Endoh). Assignee set to nobu (Nobuyoshi Nakada) Status changed from Open to Assigned ---------------------------------------- Bug #17431: paren_nest is not reset in parse.y after "foo.[]= value" https://bugs.ruby-lang.org/issues/17431#change-89442 * Author: ibylich (Ilya Bylich) * Status: Assigned * Priority: Normal * Assignee: nobu (Nobuyoshi Nakada) * ruby -v: ruby 3.0.0dev (2020-12-23T14:40:04Z master 94015200b6) [x86_64-darwin19] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- `p->lex.paren_nest` is equal to 1 after the following code: ```ruby self.[]= foo ``` `paren_nest` is used to differentiate `...` for ranges/forwarded arguments, and so `./miniruby -we 'foo.[]= bar, ...'` gives no `... at EOL, should be parenthesized?` warning (`./miniruby -we 'foo.x= bar, ...'` does). Also it's used to differentiate `kDO` vs `kDO_LAMBDA`, so I believe there are code samples with lambdas and `.[]=` calls that can't be handled by Ruby but are technically valid. -- https://bugs.ruby-lang.org/ Unsubscribe: