Allow omission of parentheses in one line pattern matching [Feature #16182]

This commit is contained in:
Kazuki Tsujimoto 2021-08-19 17:03:17 +09:00
parent 00d66f7ec2
commit ecb6d6a4ef
No known key found for this signature in database
GPG key ID: BCEA306C49B81CD7
4 changed files with 27 additions and 10 deletions

View file

@ -1135,5 +1135,16 @@ ruby_version_is "2.7" do
result.should == true
end
end
ruby_version_is "3.1" do
it "can omit parentheses in one line pattern matching" do
[1, 2] => a, b
a.should == 1
b.should == 2
{a: 1} => a:
a.should == 1
end
end
end
end