summaryrefslogtreecommitdiff
path: root/NEWS.md
diff options
context:
space:
mode:
authorShugo Maeda <shugo@ruby-lang.org>2021-09-16 17:28:31 +0900
committerShugo Maeda <shugo@ruby-lang.org>2021-09-16 17:29:48 +0900
commit81fd91ab1ba0a17ba7d117d125cc439bc17aa6e0 (patch)
tree99ee016cf6578942538cffc29e37d2756a291a4d /NEWS.md
parent68bd5626c3c3520691ff14ee5dcd9da551a274f5 (diff)
Add details of Hash value ommission [ci skip]
Diffstat (limited to 'NEWS.md')
-rw-r--r--NEWS.md13
1 files changed, 10 insertions, 3 deletions
diff --git a/NEWS.md b/NEWS.md
index 666f857c49..173afe1ed7 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -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