ruby-changes:63498
From: Kazuki <ko1@a...>
Date: Sun, 1 Nov 2020 18:21:54 +0900 (JST)
Subject: [ruby-changes:63498] 7282f3113d (master): Suppress "One-line pattern matching is experimental" warning
https://git.ruby-lang.org/ruby.git/commit/?id=7282f3113d From 7282f3113ddb117f5d4ea13a60c223a3911ea224 Mon Sep 17 00:00:00 2001 From: Kazuki Tsujimoto <kazuki@c...> Date: Sun, 1 Nov 2020 18:19:05 +0900 Subject: Suppress "One-line pattern matching is experimental" warning diff --git a/spec/ruby/language/pattern_matching_spec.rb b/spec/ruby/language/pattern_matching_spec.rb index 6eefcf5..33f7aa0 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/pattern_matching_spec.rb#L11 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/