ruby-changes:59241
From: Marcus <ko1@a...>
Date: Sat, 14 Dec 2019 06:10:03 +0900 (JST)
Subject: [ruby-changes:59241] f3240eb67d (master): NEWS: fix pattern matching example
https://git.ruby-lang.org/ruby.git/commit/?id=f3240eb67d From f3240eb67dc4c807f6489a8a5ccb6eeec239efe5 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer <sto.mar@w...> Date: Fri, 13 Dec 2019 22:07:59 +0100 Subject: NEWS: fix pattern matching example diff --git a/NEWS b/NEWS index 46ab242..c7dd2b3 100644 --- a/NEWS +++ b/NEWS @@ -39,8 +39,8 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L39 "children": [{ "name": "Bob", "age": 2 }] } END - if JSON.parse(json, symbolize_names: true) in - {name: "Alice", children: [{name: "Bob", age: age}]} + case JSON.parse(json, symbolize_names: true) + in {name: "Alice", children: [{name: "Bob", age: age}]} p age #=> 2 end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/