Bug #21027
closed
`not()` receiver should be `nil`
Added by kddnewton (Kevin Newton) 3 months ago.
Updated 13 days ago.
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.!
.
- Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: REQUIRED
- Status changed from Open to Closed
- Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: REQUIRED to 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: DONE
- Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: DONE to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED, 3.4: DONE
- 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
Fixed prism tests with updated snapshots at 5640fea8aada2380145375a7f9eac2b979fe1258.
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0Like0