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:
parent
835703c69f
commit
f3240eb67d
1 changed files with 2 additions and 2 deletions
4
NEWS
4
NEWS
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue