Actions
Bug #15956
closed`{*nil}` causes confusing error message
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.0dev (2019-06-24T15:19:49Z trunk e09afd15b7) [x86_64-linux]
Description
$ ruby -e 'p({*nil})'
-e:1: syntax error, unexpected *, expecting '}'
p({*nil})
-e:1: Can't assign to nil
p({*nil})
First syntax error is intended.
But second error message Can't assign to nil
is confusing.
This happens with nil
, true
, false
and self
.
Other identifiers including keywords don't.
Actions
Like0
Like0Like0