From: tietew@... Date: 2019-06-25T04:55:40+00:00 Subject: [ruby-core:93353] [Ruby trunk Bug#15956] `{*nil}` causes confusing error message Issue #15956 has been reported by Tietew (Toru Iwase). ---------------------------------------- Bug #15956: `{*nil}` causes confusing error message https://bugs.ruby-lang.org/issues/15956 * Author: Tietew (Toru Iwase) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.7.0dev (2019-06-24T15:19:49Z trunk e09afd15b7) [x86_64-linux] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- ``` $ 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. -- https://bugs.ruby-lang.org/ Unsubscribe: