From: shevegen@... Date: 2018-03-14T15:31:06+00:00 Subject: [ruby-core:86114] [Ruby trunk Feature#14603] Better error message when double-splatting hash with string keys Issue #14603 has been updated by shevegen (Robert A. Heiler). Ideally we could have some means to control the warning/error format. That way people could select which variant to prefer, the default one or any other way, like the one shown above. ---------------------------------------- Feature #14603: Better error message when double-splatting hash with string keys https://bugs.ruby-lang.org/issues/14603#change-70983 * Author: apotonick (Nick Sutterer) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- I couldn't find an existing issue even though I remember reading about it somewhere. When double-splatting a hash with string keys, the error message is very cryptic. ~~~ ruby a( **{ "key" => 1} ) #=> TypeError (wrong argument type String (expected Symbol)) ~~~ Would it make sense to have a more descriptive error message here, such as "*hash key `"key"` is not a Symbol*" or something? -- https://bugs.ruby-lang.org/ Unsubscribe: