From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.0 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_PASS,T_DKIM_INVALID, T_RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id E79201FAED for ; Fri, 9 Jun 2017 07:37:15 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 0BB3F1207BA; Fri, 9 Jun 2017 16:37:12 +0900 (JST) Received: from o1678916x28.outbound-mail.sendgrid.net (o1678916x28.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id DA1701207B2 for ; Fri, 9 Jun 2017 16:37:09 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=0YpCXGDoLEnCZ7arWCF8LHwnXKA=; b=lY21c/ahZL4hK7js0R coVHWobkqMAl6A2lAoYp+Bz/you84xZlH8QQ4+2pG+lZPjWvUmvZJk3naP2sQGrD Kxj3+gZ+vD6kZYOesfpewjUlX1B1myrCLNciwfFypJXtKvD9kPuPhT9tkArfv7V7 ZdUmI+6vQn8qM/yrYX8f6x+lM= Received: by filter0660p1mdw1.sendgrid.net with SMTP id filter0660p1mdw1-14666-593A5020-36 2017-06-09 07:37:05.007208975 +0000 UTC Received: from herokuapp.com (ec2-54-83-92-26.compute-1.amazonaws.com [54.83.92.26]) by ismtpd0002p1iad1.sendgrid.net (SG) with ESMTP id fvv5kZfASQWO-nODdX8slw for ; Fri, 09 Jun 2017 07:37:04.947 +0000 (UTC) Date: Fri, 09 Jun 2017 07:37:04 +0000 From: ndnenkov@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 56655 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 13645 X-Redmine-Issue-Author: ndn X-Redmine-Sender: ndn X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS477XhskJ6sYsGoibUZyWql/PCIoSitx5IRh6 P1JJfkzPjHeMTRjftX51vJlc3Ub3gMxM5KIp2Yuh04Xo52EX6WRDiYxc9f/MGoV8BftN5li+D+Xr/2 K/U095TN9KwPfmuV2GJdTbE/LINYg3PpKN1KieDAlAP9DKeug6aAyN650g== X-ML-Name: ruby-core X-Mail-Count: 81629 Subject: [ruby-core:81629] [Ruby trunk Feature#13645] Syntactic sugar for indexing when using the safe navigation operator X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #13645 has been reported by ndn (Nikola Nenkov). ---------------------------------------- Feature #13645: Syntactic sugar for indexing when using the safe navigation operator https://bugs.ruby-lang.org/issues/13645 * Author: ndn (Nikola Nenkov) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- # Proposal While it works and makes sense, this is a bit cumbersome: ```ruby hash&.[](:key) ``` Ideally, we could use something like: ```ruby hash&.[:key] ``` -- https://bugs.ruby-lang.org/