3 ms·
When I was looking at the page, I noticed that the example: { key: "value", dr_nic: "The Comedian", ttl: 42 } didn't seem to use the :symbols I know
by rb2k_ 16y ago
When I was looking at the page, I noticed that the example:
{
key: "value",
dr_nic: "The Comedian",
ttl: 42
}
didn't seem to use the :symbols I know but omitted the colon.
Turns out, it somehow works:
> a = {my_key: "my_value"}
=> {:my_key=>"my_value"}
Has this always been there? It's kinda weird because that way they look like regular variables O_o