ruby-changes:68009
From: Shugo <ko1@a...>
Date: Thu, 16 Sep 2021 17:30:21 +0900 (JST)
Subject: [ruby-changes:68009] 81fd91ab1b (master): Add details of Hash value ommission [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=81fd91ab1b From 81fd91ab1ba0a17ba7d117d125cc439bc17aa6e0 Mon Sep 17 00:00:00 2001 From: Shugo Maeda <shugo@r...> Date: Thu, 16 Sep 2021 17:28:31 +0900 Subject: Add details of Hash value ommission [ci skip] --- NEWS.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 666f857..173afe1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -69,10 +69,17 @@ Note that each entry is kept to a minimum, see links for details. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L69 [[Bug #4443]] -* Values in Hash literals and keyword arguments can be omitted. [[Feature #14579]] +* Values in Hash literals and keyword arguments can be omitted. + [[Feature #14579]] + For example, - `{x:, y:}` is a syntax sugar of `{x: x, y: y}`. - `foo(x:, y:)` is a syntax sugar of `foo(x: x, y: y)`. + * `{x:, y:}` is a syntax sugar of `{x: x, y: y}`. + * `foo(x:, y:)` is a syntax sugar of `foo(x: x, y: y)`. + + Constant names, local variable names, and method names are allowed as + key names. Note that a reserved word is considered as a local + variable or method name even if it's a pseudo variable name such as + `self`. ## Command line options -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/