diff options
author | Kazuki Tsujimoto <kazuki@callcc.net> | 2020-11-01 13:28:24 +0900 |
---|---|---|
committer | Kazuki Tsujimoto <kazuki@callcc.net> | 2020-11-01 13:33:58 +0900 |
commit | b60153241121297c94de976419d421683da4d51b (patch) | |
tree | b1c1c8f8ca5d89f72de73d1fece79c4d490fb8df /NEWS.md | |
parent | 4f8d9b0db84c42c8d37f75de885de1c0a5cb542c (diff) |
Pattern matching is no longer experimental
Diffstat (limited to 'NEWS.md')
-rw-r--r-- | NEWS.md | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -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] |