ruby-changes:66822
From: Kazuhiro <ko1@a...>
Date: Sat, 17 Jul 2021 13:25:37 +0900 (JST)
Subject: [ruby-changes:66822] f11f9fc921 (master): Disable spec of `pattern matching is experimental` since 3.1
https://git.ruby-lang.org/ruby.git/commit/?id=f11f9fc921 From f11f9fc9212c088087b1af1dd7de66eb25135377 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Sat, 17 Jul 2021 13:24:23 +0900 Subject: Disable spec of `pattern matching is experimental` since 3.1 --- spec/ruby/language/pattern_matching_spec.rb | 30 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/spec/ruby/language/pattern_matching_spec.rb b/spec/ruby/language/pattern_matching_spec.rb index dae2828..4e9d42b 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/pattern_matching_spec.rb#L41 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 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/