diff options
author | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2021-07-17 13:24:23 +0900 |
---|---|---|
committer | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2021-07-17 13:24:23 +0900 |
commit | f11f9fc9212c088087b1af1dd7de66eb25135377 (patch) | |
tree | 2f3feb676e635877cc9ac000401d29b96485fbb7 /spec/ruby | |
parent | 2a5b5ff49a0fb62a98451323a608f5f1ba0c9116 (diff) |
Disable spec of `pattern matching is experimental` since 3.1
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/language/pattern_matching_spec.rb | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/spec/ruby/language/pattern_matching_spec.rb b/spec/ruby/language/pattern_matching_spec.rb index dae2828bf6..4e9d42b257 100644 --- a/spec/ruby/language/pattern_matching_spec.rb +++ b/spec/ruby/language/pattern_matching_spec.rb @@ -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' - 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 + ruby_version_is "3.0" do + @src = '[0, 1] => [a, b]' + end - @experimental, Warning[:experimental] = Warning[:experimental], true - end + @experimental, Warning[:experimental] = Warning[:experimental], true + end - after :each do - Warning[:experimental] = @experimental - 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 |