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:
parent
1b45174aea
commit
a8cf526ae9
4 changed files with 19 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue