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

07/04/2026

07:40 AM Ruby Feature #22111: Non-symbolic hash keys with `expr : value` syntax
Thanks @baweaver.
(This proposal is not _just_ to free up String keys, but - yes - there must be a considerable amount of code and authors that have been, and will continue to be, affected just by this lack of support for String keys in...
yertto (_ yertto)

06/28/2026

05:37 AM Ruby Feature #22111: Non-symbolic hash keys with `expr : value` syntax
Looking for an answer to my own question:
> > [!NOTE]
> ...
I've found:
* https://docs.ruby-lang.org/en/3.0/syntax/pattern_matching_rdoc.html
> Note that only symbol keys are supported for hash patterns.
* @baweaver said in [rubytalk...
yertto (_ yertto)

06/23/2026

08:11 AM Ruby Feature #22111: Non-symbolic hash keys with `expr : value` syntax
BTW, what I was alluding to in my side question above was how adding _"hash colon"_ syntax (eg. `"key" : value`) to `Hash` could unlock pattern matching on string-keyed values.
Previously `in {key: ...}` only matched symbol keys, so par...
yertto (_ yertto)

06/15/2026

12:56 PM Ruby Feature #22111: Non-symbolic hash keys with `expr : value` syntax
> > ```ruby
> ...
Fair - I should have included `a = 1` - but yes - agreed - they do look confusing in isolation.
Could the confusion be unfamiliarity, rather than complexity though?
If we compare:
```ruby
{ name: "Alice", extra_key =>...
yertto (_ yertto)

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