From 963359a7622fb064331504a29a8bf65283d25551 Mon Sep 17 00:00:00 2001 From: Kazuki Tsujimoto Date: Sun, 1 Nov 2020 18:58:52 +0900 Subject: Use the suppress_warning helper instead of doing it manually --- spec/ruby/language/pattern_matching_spec.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'spec/ruby/language/pattern_matching_spec.rb') diff --git a/spec/ruby/language/pattern_matching_spec.rb b/spec/ruby/language/pattern_matching_spec.rb index 33f7aa0e6d..e82b0f5b3c 100644 --- a/spec/ruby/language/pattern_matching_spec.rb +++ b/spec/ruby/language/pattern_matching_spec.rb @@ -11,14 +11,11 @@ ruby_version_is "2.7" do ruby_version_is "3.0" do it "can be standalone assoc operator that deconstructs value" do - $VERBOSE, verbose = nil, $VERBOSE - begin + suppress_warning do eval(<<-RUBY).should == [0, 1] [0, 1] => [a, b] [a, b] RUBY - ensure - $VERBOSE = verbose end end end -- cgit v1.2.3