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

@ -38,12 +38,20 @@ ruby_version_is "2.7" do
RUBY
end
it "warns about pattern matching is experimental feature" do
-> {
eval <<~RUBY
1 => a
RUBY
}.should complain(/warning: One-line pattern matching is experimental, and the behavior may change in future versions of Ruby!/)
describe "warning" 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 "warns about pattern matching is experimental feature" do
-> { eval @src }.should complain(/pattern matching is experimental, and the behavior may change in future versions of Ruby!/i)
end
end
it "binds variables" do