diff options
author | Shugo Maeda <shugo@ruby-lang.org> | 2021-09-16 17:28:31 +0900 |
---|---|---|
committer | Shugo Maeda <shugo@ruby-lang.org> | 2021-09-16 17:29:48 +0900 |
commit | 81fd91ab1ba0a17ba7d117d125cc439bc17aa6e0 (patch) | |
tree | 99ee016cf6578942538cffc29e37d2756a291a4d /NEWS.md | |
parent | 68bd5626c3c3520691ff14ee5dcd9da551a274f5 (diff) |
Add details of Hash value ommission [ci skip]
Diffstat (limited to 'NEWS.md')
-rw-r--r-- | NEWS.md | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -69,10 +69,17 @@ Note that each entry is kept to a minimum, see links for details. [[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 |