Actions
Feature #9686
openSyntax for symbols used in hashes
Feature #9686:
Syntax for symbols used in hashes
Status:
Open
Assignee:
-
Target version:
-
Description
Symbols are often used literally as keys in hashes like this:
But acutally there is a little inconvenience when using the alternative :"name" literal syntax:
It would be great if Ruby provided the possibility to write the second example like this:
This would be logical, because you can write both syntaxes the same way when not using them in hashes.
Updated by bitsweat (Jeremy Daer) over 12 years ago
See #4276
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
- Description updated (diff)
Updated by phluid61 (Matthew Kerwin) over 12 years ago
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
Sorry, string.to_sym.
Updated by googlefeud (google feud (spammer, locked)) over 8 years ago
- Subject changed from Syntax for symbols used in hashes to google classroom
You can solve your issue by using oogle classroom login
Updated by usa (Usaku NAKAMURA) over 8 years ago
- Subject changed from google classroom to Syntax for symbols used in hashes
Updated by hsbt (Hiroshi SHIBATA) over 4 years ago
- Project changed from 14 to Ruby
Actions