summaryrefslogtreecommitdiff
path: root/NEWS.md
diff options
context:
space:
mode:
authorKazuki Tsujimoto <kazuki@callcc.net>2020-11-01 13:28:24 +0900
committerKazuki Tsujimoto <kazuki@callcc.net>2020-11-01 13:33:58 +0900
commitb60153241121297c94de976419d421683da4d51b (patch)
treeb1c1c8f8ca5d89f72de73d1fece79c4d490fb8df /NEWS.md
parent4f8d9b0db84c42c8d37f75de885de1c0a5cb542c (diff)
Pattern matching is no longer experimental
Diffstat (limited to 'NEWS.md')
-rw-r--r--NEWS.md18
1 files changed, 17 insertions, 1 deletions
diff --git a/NEWS.md b/NEWS.md
index c7a4036a0a..2fa1b3db2e 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -48,7 +48,23 @@ sufficient information, see the ChangeLog file or Redmine
instead of a warning. yield in a class definition outside of a method
is now a SyntaxError instead of a LocalJumpError. [[Feature #15575]]
-* Find pattern is added. [[Feature #16828]]
+* Pattern matching is no longer experimental. [[Feature #17260]]
+
+* One-line pattern matching now uses `=>` instead of `in`. [EXPERIMENTAL]
+ [[Feature #17260]]
+
+ ```ruby
+ # version 3.0
+ {a: 0, b: 1} => {a:}
+ p a # => 0
+
+ # version 2.7
+ {a: 0, b: 1} in {a:}
+ p a # => 0
+ ```
+
+* Find pattern is added. [EXPERIMENTAL]
+ [[Feature #16828]]
```ruby
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]