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

Don't emit warning when the pattern of one-line pattern matching is just a variable pattern

https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20201210Japan.md#feature-17371-reintroduce-expr-in-pat-ktsj
This commit is contained in:
Kazuki Tsujimoto 2020-12-13 11:47:02 +09:00
parent 1b45174aea
commit a8cf526ae9
No known key found for this signature in database
GPG key ID: BCEA306C49B81CD7
4 changed files with 19 additions and 10 deletions

View file

@ -43,11 +43,11 @@ ruby_version_is "2.7" do
describe "warning" do
before do
ruby_version_is ""..."3.0" do
@src = 'case 0; in a; end'
@src = 'case [0, 1]; in [a, b]; end'
end
ruby_version_is "3.0" do
@src = '1 => a'
@src = '[0, 1] => [a, b]'
end
end