General

Profile

yertto (_ yertto)

  • Login: yertto
  • Registered on: 06/11/2026
  • Last sign in: 06/11/2026

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 2 0 2

Activity

06/14/2026

06:10 AM Ruby Feature #22108: Computed hash keys with (expr): syntax
> (BTW, I had considered making whitespace the disambiguator. ie. { foo: bar } for symbol keys, { foo : bar } for computed keys, but I came up with a few reasons against it, and so went with the parentheses design instead. Someone else i... yertto (_ yertto)
06:05 AM Ruby Feature #22111 (Open): Non-symbolic hash keys with `expr : value` syntax
# Non-symbolic hash keys with `expr : value` syntax
Allow `expr : value` for non-symbolic hash keys.
Almost 20 years in the making, the missing puzzle piece for Hash's "new" colon syntax:
```ruby
h = {
name: "symbol shorthan...
yertto (_ yertto)

06/13/2026

10:40 AM Ruby Feature #22108: Computed hash keys with (expr): syntax
> yet another hash assoc syntax
You're right — `:` is not an operator. And this change doesn't treat it as one.
`:` works the same way it always has: you put something on the left, put `:` after it, and that something becomes the hash ...
yertto (_ yertto)

06/12/2026

11:10 AM Ruby Feature #22108: Computed hash keys with (expr): syntax
No, its different from `{ "#{expr}": value }`.
That would produce a `Symbol` for the key.
eg.
```
expr = "key"; value = "val"
{ "#{expr}": value }.keys
# => [:key]
```
Whereas using `():` the key stays unchanged (ie. as a `String` in t...
yertto (_ yertto)
08:28 AM Ruby Feature #22108 (Open): Computed hash keys with (expr): syntax
> [!WARNING]
> ...
# Computed hash keys with `(expr):` syntax
Allow `{ (expr): value }` as a computed hash key.
Almost 20 years in the making, the missing puzzle piece for Hash's "new" colon notation:
```ruby
h = {
name: "sym...
yertto (_ yertto)

Also available in: Atom