< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #9047 has been updated by rosenfeld (Rodrigo Rosenfeld Rosas).
I'd prefer to reserve this syntax as a short hash syntax for string keyed hashes:
{
'string': 'v' # equivalent to 'string' => 'v'
}
If your proposal is accepted, then it wouldn't be possible add the short syntax support for strings.
Do you have any real-world use case where a symbol would be useful but you need the :'xxx' constructor to generate it? I don't think this is a common thing to happen...
----------------------------------------
Feature #9047: Alternate hash key syntax for symbols
https://bugs.ruby-lang.org/issues/9047#change-42574
Author: jamonholmgren (Jamon Holmgren)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
=begin
In Ruby, if you can create a symbol with ((|:"symbolname"|)), it seems consistent to allow moving the colon to the right side in a hash and dropping the hash rocket (=>).
{
:str => "v", # symbol
str: "v", # symbol
:"str" => "v", # symbol
"str": "v", # should also be a symbol
}
It would look like this:
h = {
"mykey": "value",
"otherkey": "othervalue",
regular_symbol: "value"
}
String and other non-symbol keys would retain the hash rocket syntax to avoid ambiguity.
{
"string" => "v",
MyObj.new => "v",
@my_var => "v"
}
Thoughts?
=end
--
http://bugs.ruby-lang.org/