1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use the suppress_warning helper instead of doing it manually

This commit is contained in:
Kazuki Tsujimoto 2020-11-01 18:58:52 +09:00
parent 7282f3113d
commit 963359a762
No known key found for this signature in database
GPG key ID: BCEA306C49B81CD7

View file

@ -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