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

Fix Rubyspec (ruby-2.7) failures

1337845174
This commit is contained in:
Kazuki Tsujimoto 2020-11-01 17:24:36 +09:00
parent e03e1982bd
commit e0e2492cd3
No known key found for this signature in database
GPG key ID: BCEA306C49B81CD7
3 changed files with 41 additions and 11 deletions

View file

@ -31,11 +31,21 @@ ruby_version_is "2.7" do
end
describe "The -W command line option with :no-experimental" do
before do
ruby_version_is ""..."3.0" do
@src = 'case 0; in a; end'
end
ruby_version_is "3.0" do
@src = '1 => a'
end
end
it "suppresses experimental warnings" do
result = ruby_exe('1 => a', args: '2>&1')
result = ruby_exe(@src, args: '2>&1')
result.should =~ /is experimental/
result = ruby_exe('case 0; in a; end', options: '-W:no-experimental', args: '2>&1')
result = ruby_exe(@src, options: '-W:no-experimental', args: '2>&1')
result.should == ""
end
end