Project

General

Profile

Actions

Feature #13645

open

Syntactic sugar for indexing when using the safe navigation operator

Added by ndn (Nikola Nenkov) over 7 years ago. Updated over 5 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:81629]

Description

Proposal

While it works and makes sense, this is a bit cumbersome:

hash&.[](:key)

Ideally, we could use something like:

hash&.[:key]

Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Feature #11813: Extend safe navigation operator for [] and []= with syntax sugarRejectedmatz (Yukihiro Matsumoto)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0