mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Disable spec of pattern matching is experimental
since 3.1
This commit is contained in:
parent
2a5b5ff49a
commit
f11f9fc921
1 changed files with 16 additions and 14 deletions
|
@ -41,24 +41,26 @@ ruby_version_is "2.7" do
|
|||
end
|
||||
|
||||
describe "warning" do
|
||||
before :each do
|
||||
ruby_version_is ""..."3.0" do
|
||||
@src = 'case [0, 1]; in [a, b]; end'
|
||||
ruby_version_is ""..."3.1" do
|
||||
before :each do
|
||||
ruby_version_is ""..."3.0" do
|
||||
@src = 'case [0, 1]; in [a, b]; end'
|
||||
end
|
||||
|
||||
ruby_version_is "3.0" do
|
||||
@src = '[0, 1] => [a, b]'
|
||||
end
|
||||
|
||||
@experimental, Warning[:experimental] = Warning[:experimental], true
|
||||
end
|
||||
|
||||
ruby_version_is "3.0" do
|
||||
@src = '[0, 1] => [a, b]'
|
||||
after :each do
|
||||
Warning[:experimental] = @experimental
|
||||
end
|
||||
|
||||
@experimental, Warning[:experimental] = Warning[:experimental], true
|
||||
end
|
||||
|
||||
after :each do
|
||||
Warning[:experimental] = @experimental
|
||||
end
|
||||
|
||||
it "warns about pattern matching is experimental feature" do
|
||||
-> { eval @src }.should complain(/pattern matching is experimental, and the behavior may change in future versions of Ruby!/i)
|
||||
it "warns about pattern matching is experimental feature" do
|
||||
-> { eval @src }.should complain(/pattern matching is experimental, and the behavior may change in future versions of Ruby!/i)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue