summaryrefslogtreecommitdiff
path: root/spec/ruby/language/pattern_matching_spec.rb
diff options
context:
space:
mode:
authorKazuki Tsujimoto <kazuki@callcc.net>2020-11-01 18:58:52 +0900
committerKazuki Tsujimoto <kazuki@callcc.net>2020-11-01 19:00:22 +0900
commit963359a7622fb064331504a29a8bf65283d25551 (patch)
tree00d8d2274ffd65018a8dd94b4c833d1940d5243c /spec/ruby/language/pattern_matching_spec.rb
parent7282f3113ddb117f5d4ea13a60c223a3911ea224 (diff)
Use the suppress_warning helper instead of doing it manually
Diffstat (limited to 'spec/ruby/language/pattern_matching_spec.rb')
-rw-r--r--spec/ruby/language/pattern_matching_spec.rb5
1 files changed, 1 insertions, 4 deletions
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