1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

NEWS: fix pattern matching example

This commit is contained in:
Marcus Stollsteimer 2019-12-13 22:07:59 +01:00
parent 835703c69f
commit f3240eb67d

4
NEWS
View file

@ -39,8 +39,8 @@ sufficient information, see the ChangeLog file or Redmine
"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