
Issue #21027 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED, 3.4: DONE to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE, 3.4: DONE ruby_3_3 commit:7c315e23983a35d29108d9ba8c914d6320254d43 merged revision(s) commit:117d6e145a0270ab8fc9134403519ef13b9ebb24. ---------------------------------------- Bug #21027: `not()` receiver should be `nil` https://bugs.ruby-lang.org/issues/21027#change-112566 * Author: kddnewton (Kevin Newton) * Status: Closed * Assignee: prism * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE, 3.4: DONE ---------------------------------------- `not` has a 0-argument mode, and the behavior differs from that of parse.y: ``` % RBENV_VERSION=3.4.0 ruby --parser=parse.y -e 'p not()' true % RBENV_VERSION=3.4.0 ruby --parser=prism -e 'p not()' false ``` This is because Prism interprets `not()` as `self.!` where parse.y interprets it as `nil.!`. -- https://bugs.ruby-lang.org/