Project

General

Profile

Actions

Bug #21027

closed

`not()` receiver should be `nil`

Added by kddnewton (Kevin Newton) 4 days ago. Updated 4 days ago.

Status:
Closed
Assignee:
Target version:
-
[ruby-core:120613]

Description

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.!.

Actions

Also available in: Atom PDF

Like0
Like0Like0