From: mayr.sascha@... Date: 2014-03-28T19:56:40+00:00 Subject: [ruby-core:61743] [CommonRuby - Feature #9686] [Open] Syntax for symbols used in hashes Issue #9686 has been reported by Sascha Mayr. ---------------------------------------- Feature #9686: Syntax for symbols used in hashes https://bugs.ruby-lang.org/issues/9686 * Author: Sascha Mayr * Status: Open * Priority: Normal * Assignee: * Category: * Target version: ---------------------------------------- Symbols are often used literally as keys in hashes like this: `{foo: 'bar'}` But acutally there is a little inconvenience when using the alternative :"name" literal syntax: `string = 'foo' {:"#{string}" => 'bar'}` It would be great if Ruby provided the possibility to write the second example like this: `string = 'foo' {"#{string}": 'bar'}` This would be logical, because you can write both syntaxes the same way when not using them in hashes. -- https://bugs.ruby-lang.org/