summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-12-15 13:06:29 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2022-12-15 13:06:29 -0800
commit4872e8ef14800811d98d3eb6d627386842f87f3f (patch)
treea2161ab6880787962f8ee4348c4d6f83123b5bb1
parent5e81cf8fd009d1aa74b49dce8ba174cd65776d15 (diff)
Improve Struct NEWS [ci skip]
I meant to commit diff, but it was left uncommitted locally.
-rw-r--r--NEWS.md5
1 files changed, 1 insertions, 4 deletions
diff --git a/NEWS.md b/NEWS.md
index bd163ee865..9e3d1e9a9c 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -347,11 +347,8 @@ Note: We're only listing outstanding class updates.
```ruby
Post = Struct.new(:id, :name)
-
- # In addition to this,
Post.new(1, "hello") #=> #<struct Post id=1, name="hello">
-
- # Let the following initialization also work
+ # From Ruby 3.2, the following code also works without keyword_init: true.
Post.new(id: 1, name: "hello") #=> #<struct Post id=1, name="hello">
```