summaryrefslogtreecommitdiff
path: root/spec/ruby/language/pattern_matching_spec.rb
diff options
context:
space:
mode:
authorKazuki Tsujimoto <kazuki@callcc.net>2020-11-01 18:19:05 +0900
committerKazuki Tsujimoto <kazuki@callcc.net>2020-11-01 18:19:58 +0900
commit7282f3113ddb117f5d4ea13a60c223a3911ea224 (patch)
treea15016c3a6940f278ce3f9febdcee31c1512691a /spec/ruby/language/pattern_matching_spec.rb
parente0e2492cd30eb76f084f189060de9a79d619f16e (diff)
Suppress "One-line pattern matching is experimental" warning
Diffstat (limited to 'spec/ruby/language/pattern_matching_spec.rb')
-rw-r--r--spec/ruby/language/pattern_matching_spec.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/spec/ruby/language/pattern_matching_spec.rb b/spec/ruby/language/pattern_matching_spec.rb
index 6eefcf5ab6..33f7aa0e6d 100644
--- a/spec/ruby/language/pattern_matching_spec.rb
+++ b/spec/ruby/language/pattern_matching_spec.rb
@@ -11,10 +11,15 @@ ruby_version_is "2.7" do
ruby_version_is "3.0" do
it "can be standalone assoc operator that deconstructs value" do
- eval(<<-RUBY).should == [0, 1]
- [0, 1] => [a, b]
- [a, b]
- RUBY
+ $VERBOSE, verbose = nil, $VERBOSE
+ begin
+ eval(<<-RUBY).should == [0, 1]
+ [0, 1] => [a, b]
+ [a, b]
+ RUBY
+ ensure
+ $VERBOSE = verbose
+ end
end
end