Skip to content

Commit aa134ed

Browse files
committed
1 parent 1adcc3c commit aa134ed

File tree

411 files changed

+2558
-9231
lines changed

Some content is hidden

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

411 files changed

+2558
-9231
lines changed

spec/ruby/.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
inherit_from: .rubocop_todo.yml
22

33
AllCops:
4-
TargetRubyVersion: 2.7
4+
TargetRubyVersion: 3.0
55
DisplayCopNames: true
66
Exclude:
77
- command_line/fixtures/bad_syntax.rb

spec/ruby/CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ Here is a list of the most commonly-used guards:
138138
#### Version guards
139139

140140
```ruby
141-
ruby_version_is ""..."2.6" do
142-
# Specs for RUBY_VERSION < 2.6
141+
ruby_version_is ""..."3.2" do
142+
# Specs for RUBY_VERSION < 3.2
143143
end
144144

145-
ruby_version_is "2.6" do
146-
# Specs for RUBY_VERSION >= 2.6
145+
ruby_version_is "3.2" do
146+
# Specs for RUBY_VERSION >= 3.2
147147
end
148148
```
149149

@@ -191,11 +191,11 @@ end
191191
#### Combining guards
192192

193193
```ruby
194-
guard -> { platform_is :windows and ruby_version_is ""..."2.6" } do
195-
# Windows and RUBY_VERSION < 2.6
194+
guard -> { platform_is :windows and ruby_version_is ""..."3.2" } do
195+
# Windows and RUBY_VERSION < 3.2
196196
end
197197

198-
guard_not -> { platform_is :windows and ruby_version_is ""..."2.6" } do
198+
guard_not -> { platform_is :windows and ruby_version_is ""..."3.2" } do
199199
# The opposite
200200
end
201201
```

spec/ruby/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ ruby/spec is known to be tested in these implementations for every commit:
3030
* [Opal](https://github.com/opal/opal/tree/master/spec)
3131
* [Artichoke](https://github.com/artichoke/spec/tree/artichoke-vendor)
3232

33-
ruby/spec describes the behavior of Ruby 2.7 and more recent Ruby versions.
34-
More precisely, every latest stable MRI release should [pass](https://github.com/ruby/spec/actions/workflows/ci.yml) all specs of ruby/spec (2.7.x, 3.0.x, 3.1.x, etc), and those are tested in CI.
33+
ruby/spec describes the behavior of Ruby 3.0 and more recent Ruby versions.
34+
More precisely, every latest stable MRI release should [pass](https://github.com/ruby/spec/actions/workflows/ci.yml) all specs of ruby/spec (3.0.x, 3.1.x, 3.2.x, etc), and those are tested in CI.
3535

3636
### Synchronization with Ruby Implementations
3737

@@ -61,6 +61,7 @@ For older specs try these commits:
6161
* Ruby 2.4.10 - [Suite](https://github.com/ruby/spec/commit/bce4f2b81d6c31db67cf4d023a0625ceadde59bd) using [MSpec](https://github.com/ruby/mspec/commit/e7eb8aa4c26495b7b461e687d950b96eb08b3ff2)
6262
* Ruby 2.5.9 - [Suite](https://github.com/ruby/spec/commit/c503335d3d9f6ec6ef24de60a0716c34af69b64f) using [MSpec](https://github.com/ruby/mspec/commit/0091e8a62e954717cd54641f935eaf1403692041)
6363
* Ruby 2.6.10 - [Suite](https://github.com/ruby/spec/commit/aaf998fb8c92c4e63ad423a2e7ca6e6921818c6e) using [MSpec](https://github.com/ruby/mspec/commit/5e36c684e9e2b92b1187589bba1df22c640a8661)
64+
* Ruby 2.7.8 - [Suite](https://github.com/ruby/spec/commit/93787e6035c925b593a9c0c6fb0e7e07a6f1df1f) using [MSpec](https://github.com/ruby/mspec/commit/1d8cf64722d8a7529f7cd205be5f16a89b7a67fd)
6465

6566
### Running the specs
6667

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,46 @@
11
require_relative '../spec_helper'
22

3-
ruby_version_is "3.0" do
4-
describe "The --backtrace-limit command line option" do
5-
it "limits top-level backtraces to a given number of entries" do
6-
file = fixture(__FILE__ , "backtrace.rb")
7-
out = ruby_exe(file, options: "--backtrace-limit=2", args: "top 2>&1", exit_status: 1)
8-
out = out.gsub(__dir__, '')
3+
describe "The --backtrace-limit command line option" do
4+
it "limits top-level backtraces to a given number of entries" do
5+
file = fixture(__FILE__ , "backtrace.rb")
6+
out = ruby_exe(file, options: "--backtrace-limit=2", args: "top 2>&1", exit_status: 1)
7+
out = out.gsub(__dir__, '')
98

10-
out.should == <<-MSG
9+
out.should == <<-MSG
1110
top
1211
/fixtures/backtrace.rb:2:in `a': oops (RuntimeError)
1312
\tfrom /fixtures/backtrace.rb:6:in `b'
1413
\tfrom /fixtures/backtrace.rb:10:in `c'
1514
\t ... 2 levels...
16-
MSG
17-
end
15+
MSG
16+
end
1817

19-
it "affects Exception#full_message" do
20-
file = fixture(__FILE__ , "backtrace.rb")
21-
out = ruby_exe(file, options: "--backtrace-limit=2", args: "full_message 2>&1")
22-
out = out.gsub(__dir__, '')
18+
it "affects Exception#full_message" do
19+
file = fixture(__FILE__ , "backtrace.rb")
20+
out = ruby_exe(file, options: "--backtrace-limit=2", args: "full_message 2>&1")
21+
out = out.gsub(__dir__, '')
2322

24-
out.should == <<-MSG
23+
out.should == <<-MSG
2524
full_message
2625
/fixtures/backtrace.rb:2:in `a': oops (RuntimeError)
2726
\tfrom /fixtures/backtrace.rb:6:in `b'
2827
\tfrom /fixtures/backtrace.rb:10:in `c'
2928
\t ... 2 levels...
30-
MSG
31-
end
29+
MSG
30+
end
3231

33-
it "does not affect Exception#backtrace" do
34-
file = fixture(__FILE__ , "backtrace.rb")
35-
out = ruby_exe(file, options: "--backtrace-limit=2", args: "backtrace 2>&1")
36-
out = out.gsub(__dir__, '')
32+
it "does not affect Exception#backtrace" do
33+
file = fixture(__FILE__ , "backtrace.rb")
34+
out = ruby_exe(file, options: "--backtrace-limit=2", args: "backtrace 2>&1")
35+
out = out.gsub(__dir__, '')
3736

38-
out.should == <<-MSG
37+
out.should == <<-MSG
3938
backtrace
4039
/fixtures/backtrace.rb:2:in `a'
4140
/fixtures/backtrace.rb:6:in `b'
4241
/fixtures/backtrace.rb:10:in `c'
4342
/fixtures/backtrace.rb:14:in `d'
4443
/fixtures/backtrace.rb:29:in `<main>'
45-
MSG
46-
end
44+
MSG
4745
end
4846
end

spec/ruby/core/argf/bytes_spec.rb

Lines changed: 0 additions & 16 deletions
This file was deleted.

spec/ruby/core/argf/chars_spec.rb

Lines changed: 0 additions & 16 deletions
This file was deleted.

spec/ruby/core/argf/codepoints_spec.rb

Lines changed: 0 additions & 16 deletions
This file was deleted.

spec/ruby/core/argf/lines_spec.rb

Lines changed: 0 additions & 16 deletions
This file was deleted.

spec/ruby/core/array/drop_spec.rb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,7 @@
5050
-> { [1, 2].drop(obj) }.should raise_error(TypeError)
5151
end
5252

53-
ruby_version_is ''...'3.0' do
54-
it 'returns a subclass instance for Array subclasses' do
55-
ArraySpecs::MyArray[1, 2, 3, 4, 5].drop(1).should be_an_instance_of(ArraySpecs::MyArray)
56-
end
57-
end
58-
59-
ruby_version_is '3.0' do
60-
it 'returns a Array instance for Array subclasses' do
61-
ArraySpecs::MyArray[1, 2, 3, 4, 5].drop(1).should be_an_instance_of(Array)
62-
end
53+
it 'returns a Array instance for Array subclasses' do
54+
ArraySpecs::MyArray[1, 2, 3, 4, 5].drop(1).should be_an_instance_of(Array)
6355
end
6456
end

spec/ruby/core/array/drop_while_spec.rb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,7 @@
1818
[1, 2, 3, false, 5].drop_while { |n| n }.should == [false, 5]
1919
end
2020

21-
ruby_version_is ''...'3.0' do
22-
it 'returns a subclass instance for Array subclasses' do
23-
ArraySpecs::MyArray[1, 2, 3, 4, 5].drop_while { |n| n < 4 }.should be_an_instance_of(ArraySpecs::MyArray)
24-
end
25-
end
26-
27-
ruby_version_is '3.0' do
28-
it 'returns a Array instance for Array subclasses' do
29-
ArraySpecs::MyArray[1, 2, 3, 4, 5].drop_while { |n| n < 4 }.should be_an_instance_of(Array)
30-
end
21+
it 'returns a Array instance for Array subclasses' do
22+
ArraySpecs::MyArray[1, 2, 3, 4, 5].drop_while { |n| n < 4 }.should be_an_instance_of(Array)
3123
end
3224
end

0 commit comments

Comments
 (0)