Skip to content

Commit 055d83c

Browse files
committed
Drop support for Ruby 2.6 which is now EOL
* https://www.ruby-lang.org/en/news/2022/04/12/ruby-2-6-10-released/
1 parent eb098b3 commit 055d83c

File tree

257 files changed

+3230
-7341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

257 files changed

+3230
-7341
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
fail-fast: false
77
matrix:
88
os: [ ubuntu, macos, windows ]
9-
ruby: [ 2.6.10, 2.7.6, 3.0.4, 3.1.2 ]
9+
ruby: [ 2.7.6, 3.0.4, 3.1.2 ]
1010
runs-on: ${{ matrix.os }}-latest
1111
steps:
1212
- name: git config autocrlf
@@ -57,6 +57,6 @@ jobs:
5757
- uses: actions/checkout@v2
5858
- uses: ruby/setup-ruby@v1
5959
with:
60-
ruby-version: 2.6
60+
ruby-version: 2.7
6161
- run: gem install rubocop:0.77.0
6262
- run: rubocop --parallel

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ First, file a bug at https://bugs.ruby-lang.org/.
180180
It is better to use a `ruby_version_is` guard if there was a release with the fix.
181181

182182
```ruby
183-
ruby_bug '#13669', ''...'2.7' do
183+
ruby_bug '#13669', ''...'3.2' do
184184
it "works like this" do
185185
# Specify the expected behavior here, not the bug
186186
end

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ For older specs try these commits:
6161
* Ruby 2.3.8 - [Suite](https://github.com/ruby/spec/commit/dc733114d8ae66a3368ba3a98422c50147a76ba5) using [MSpec](https://github.com/ruby/mspec/commit/4599bc195fb109f2a482a01c32a7d659518369ea)
6262
* Ruby 2.4.10 - [Suite](https://github.com/ruby/spec/commit/bce4f2b81d6c31db67cf4d023a0625ceadde59bd) using [MSpec](https://github.com/ruby/mspec/commit/e7eb8aa4c26495b7b461e687d950b96eb08b3ff2)
6363
* Ruby 2.5.9 - [Suite](https://github.com/ruby/spec/commit/c503335d3d9f6ec6ef24de60a0716c34af69b64f) using [MSpec](https://github.com/ruby/mspec/commit/0091e8a62e954717cd54641f935eaf1403692041)
64+
* Ruby 2.6.10 - [Suite](https://github.com/ruby/spec/commit/aaf998fb8c92c4e63ad423a2e7ca6e6921818c6e) using [MSpec](https://github.com/ruby/mspec/commit/5e36c684e9e2b92b1187589bba1df22c640a8661)
6465

6566
### Running the specs
6667

command_line/dash_upper_w_spec.rb

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,26 @@
1919
it_behaves_like :command_line_verbose, "-W2"
2020
end
2121

22-
# Regarding the defaults, see core/warning/element_reference_spec.rb
23-
ruby_version_is "2.7" do
24-
describe "The -W command line option with :deprecated" do
25-
it "enables deprecation warnings" do
26-
ruby_exe('p Warning[:deprecated]', options: '-W:deprecated').should == "true\n"
27-
end
22+
describe "The -W command line option with :deprecated" do
23+
it "enables deprecation warnings" do
24+
ruby_exe('p Warning[:deprecated]', options: '-W:deprecated').should == "true\n"
2825
end
26+
end
2927

30-
describe "The -W command line option with :no-deprecated" do
31-
it "suppresses deprecation warnings" do
32-
ruby_exe('p Warning[:deprecated]', options: '-w -W:no-deprecated').should == "false\n"
33-
end
28+
describe "The -W command line option with :no-deprecated" do
29+
it "suppresses deprecation warnings" do
30+
ruby_exe('p Warning[:deprecated]', options: '-w -W:no-deprecated').should == "false\n"
3431
end
32+
end
3533

36-
describe "The -W command line option with :experimental" do
37-
it "enables experimental warnings" do
38-
ruby_exe('p Warning[:experimental]', options: '-W:experimental').should == "true\n"
39-
end
34+
describe "The -W command line option with :experimental" do
35+
it "enables experimental warnings" do
36+
ruby_exe('p Warning[:experimental]', options: '-W:experimental').should == "true\n"
4037
end
38+
end
4139

42-
describe "The -W command line option with :no-experimental" do
43-
it "suppresses experimental warnings" do
44-
ruby_exe('p Warning[:experimental]', options: '-w -W:no-experimental').should == "false\n"
45-
end
40+
describe "The -W command line option with :no-experimental" do
41+
it "suppresses experimental warnings" do
42+
ruby_exe('p Warning[:experimental]', options: '-w -W:no-experimental').should == "false\n"
4643
end
4744
end

command_line/dash_w_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
describe "The -w command line option" do
55
it_behaves_like :command_line_verbose, "-w"
66

7-
ruby_version_is "2.7" do
8-
it "enables both deprecated and experimental warnings" do
9-
ruby_exe('p Warning[:deprecated]; p Warning[:experimental]', options: '-w').should == "true\ntrue\n"
10-
end
7+
it "enables both deprecated and experimental warnings" do
8+
ruby_exe('p Warning[:deprecated]; p Warning[:experimental]', options: '-w').should == "true\ntrue\n"
119
end
1210
end

command_line/rubyopt_spec.rb

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,22 @@
5959
ruby_exe("p $VERBOSE", escape: true).chomp.should == "true"
6060
end
6161

62-
ruby_version_is "2.7" do
63-
it "suppresses deprecation warnings for '-W:no-deprecated'" do
64-
ENV["RUBYOPT"] = '-W:no-deprecated'
65-
result = ruby_exe('$; = ""', args: '2>&1')
66-
result.should == ""
67-
end
62+
it "suppresses deprecation warnings for '-W:no-deprecated'" do
63+
ENV["RUBYOPT"] = '-W:no-deprecated'
64+
result = ruby_exe('$; = ""', args: '2>&1')
65+
result.should == ""
66+
end
6867

69-
it "suppresses experimental warnings for '-W:no-experimental'" do
70-
ENV["RUBYOPT"] = '-W:no-experimental'
71-
result = ruby_exe('case 0; in a; end', args: '2>&1')
72-
result.should == ""
73-
end
68+
it "suppresses experimental warnings for '-W:no-experimental'" do
69+
ENV["RUBYOPT"] = '-W:no-experimental'
70+
result = ruby_exe('case 0; in a; end', args: '2>&1')
71+
result.should == ""
72+
end
7473

75-
it "suppresses deprecation and experimental warnings for '-W:no-deprecated -W:no-experimental'" do
76-
ENV["RUBYOPT"] = '-W:no-deprecated -W:no-experimental'
77-
result = ruby_exe('case ($; = ""); in a; end', args: '2>&1')
78-
result.should == ""
79-
end
74+
it "suppresses deprecation and experimental warnings for '-W:no-deprecated -W:no-experimental'" do
75+
ENV["RUBYOPT"] = '-W:no-deprecated -W:no-experimental'
76+
result = ruby_exe('case ($; = ""); in a; end', args: '2>&1')
77+
result.should == ""
8078
end
8179

8280
it "requires the file for '-r'" do

core/array/clear_spec.rb

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,10 @@
2020
a.size.should == 0
2121
end
2222

23-
ruby_version_is ''...'2.7' do
24-
it "keeps tainted status" do
25-
a = [1]
26-
a.taint
27-
a.tainted?.should be_true
28-
a.clear
29-
a.tainted?.should be_true
30-
end
31-
end
32-
3323
it "does not accept any arguments" do
3424
-> { [1].clear(true) }.should raise_error(ArgumentError)
3525
end
3626

37-
ruby_version_is ''...'2.7' do
38-
it "keeps untrusted status" do
39-
a = [1]
40-
a.untrust
41-
a.untrusted?.should be_true
42-
a.clear
43-
a.untrusted?.should be_true
44-
end
45-
end
46-
4727
it "raises a FrozenError on a frozen array" do
4828
a = [1]
4929
a.freeze

core/array/compact_spec.rb

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,6 @@
2121
it "does not return subclass instance for Array subclasses" do
2222
ArraySpecs::MyArray[1, 2, 3, nil].compact.should be_an_instance_of(Array)
2323
end
24-
25-
ruby_version_is ''...'2.7' do
26-
it "does not keep tainted status even if all elements are removed" do
27-
a = [nil, nil]
28-
a.taint
29-
a.compact.tainted?.should be_false
30-
end
31-
32-
it "does not keep untrusted status even if all elements are removed" do
33-
a = [nil, nil]
34-
a.untrust
35-
a.compact.untrusted?.should be_false
36-
end
37-
end
3824
end
3925

4026
describe "Array#compact!" do
@@ -59,22 +45,6 @@
5945
[1, 2, false, 3].compact!.should == nil
6046
end
6147

62-
ruby_version_is ''...'2.7' do
63-
it "keeps tainted status even if all elements are removed" do
64-
a = [nil, nil]
65-
a.taint
66-
a.compact!
67-
a.tainted?.should be_true
68-
end
69-
70-
it "keeps untrusted status even if all elements are removed" do
71-
a = [nil, nil]
72-
a.untrust
73-
a.compact!
74-
a.untrusted?.should be_true
75-
end
76-
end
77-
7848
it "raises a FrozenError on a frozen array" do
7949
-> { ArraySpecs.frozen_array.compact! }.should raise_error(FrozenError)
8050
end

core/array/concat_spec.rb

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -41,64 +41,6 @@
4141
-> { ArraySpecs.frozen_array.concat([]) }.should raise_error(FrozenError)
4242
end
4343

44-
ruby_version_is ''...'2.7' do
45-
it "keeps tainted status" do
46-
ary = [1, 2]
47-
ary.taint
48-
ary.concat([3])
49-
ary.tainted?.should be_true
50-
ary.concat([])
51-
ary.tainted?.should be_true
52-
end
53-
54-
it "is not infected by the other" do
55-
ary = [1,2]
56-
other = [3]; other.taint
57-
ary.tainted?.should be_false
58-
ary.concat(other)
59-
ary.tainted?.should be_false
60-
end
61-
62-
it "keeps the tainted status of elements" do
63-
ary = [ Object.new, Object.new, Object.new ]
64-
ary.each {|x| x.taint }
65-
66-
ary.concat([ Object.new ])
67-
ary[0].tainted?.should be_true
68-
ary[1].tainted?.should be_true
69-
ary[2].tainted?.should be_true
70-
ary[3].tainted?.should be_false
71-
end
72-
73-
it "keeps untrusted status" do
74-
ary = [1, 2]
75-
ary.untrust
76-
ary.concat([3])
77-
ary.untrusted?.should be_true
78-
ary.concat([])
79-
ary.untrusted?.should be_true
80-
end
81-
82-
it "is not infected untrustedness by the other" do
83-
ary = [1,2]
84-
other = [3]; other.untrust
85-
ary.untrusted?.should be_false
86-
ary.concat(other)
87-
ary.untrusted?.should be_false
88-
end
89-
90-
it "keeps the untrusted status of elements" do
91-
ary = [ Object.new, Object.new, Object.new ]
92-
ary.each {|x| x.untrust }
93-
94-
ary.concat([ Object.new ])
95-
ary[0].untrusted?.should be_true
96-
ary[1].untrusted?.should be_true
97-
ary[2].untrusted?.should be_true
98-
ary[3].untrusted?.should be_false
99-
end
100-
end
101-
10244
it "appends elements to an Array with enough capacity that has been shifted" do
10345
ary = [1, 2, 3, 4, 5]
10446
2.times { ary.shift }

core/array/deconstruct_spec.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
require_relative '../../spec_helper'
22

3-
ruby_version_is "2.7" do
4-
describe "Array#deconstruct" do
5-
it "returns self" do
6-
array = [1]
3+
describe "Array#deconstruct" do
4+
it "returns self" do
5+
array = [1]
76

8-
array.deconstruct.should equal array
9-
end
7+
array.deconstruct.should equal array
108
end
119
end

0 commit comments

Comments
 (0)