diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2021-01-17 01:35:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-17 01:35:54 -0800 |
commit | 8d099aa040427aede04e42c3ec9380afd431ffe3 (patch) | |
tree | d3c827abba8cf514f9cb3607723270c2419b539e /NEWS.md | |
parent | e033c9d7db02a4e8d2973364ecb47744b63aecd3 (diff) |
Warn Struct#initialize with only keyword args (#4070)
* Warn Struct#initialize with only keyword args
A part of [Feature #16806]
* Do not warn if `keyword_init: false`
is explicitly specified
* Add a NEWS entry
* s/in/from/
* Make sure all fields are initialized
Notes
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
Diffstat (limited to 'NEWS.md')
-rw-r--r-- | NEWS.md | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -28,6 +28,12 @@ Outstanding ones only. modify the ancestor chain if the receiver has already prepended the argument. [[Bug #17423]] +* Struct + + * Passing only keyword arguments to Struct#initialize is warned. + You need to use a Hash literal to set a Hash to a first member. + [[Feature #16806]] + ## Stdlib updates Outstanding ones only. @@ -55,5 +61,6 @@ Excluding feature bug fixes. ## Miscellaneous changes +[Feature #16806]: https://bugs.ruby-lang.org/issues/16806 [Feature #17312]: https://bugs.ruby-lang.org/issues/17312 [Bug #17423]: https://bugs.ruby-lang.org/issues/17423 |