Skip to content

Commit 273fffb

Browse files
authored
Merge pull request #2741 from ruby/ruby-4-2nd
Merge pull request #2718 from ruby/ruby-4
2 parents c1a5645 + be46cf5 commit 273fffb

File tree

16 files changed

+91
-72
lines changed

16 files changed

+91
-72
lines changed

.github/workflows/c-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v4
1313
- uses: ruby/setup-ruby@v1
1414
with:
15-
ruby-version: "3.4"
15+
ruby-version: "4.0.0-preview2"
1616
bundler-cache: none
1717
- name: Set working directory as safe
1818
run: git config --global --add safe.directory $(pwd)

.github/workflows/ruby.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
ruby: ['3.1', '3.2', '3.3', '3.4', head]
16+
ruby: ['3.2', '3.3', '3.4', '4.0.0-preview2', head]
1717
rubyopt: [""]
1818
job:
1919
- test
2020
include:
2121
- ruby: head
2222
job: stdlib_test rubocop
23-
- ruby: "3.4"
23+
- ruby: "4.0.0-preview2"
2424
job: stdlib_test
25-
- ruby: "3.4"
25+
- ruby: "4.0.0-preview2"
2626
job: test
2727
rubyopt: "--enable-frozen-string-literal"
28-
- ruby: "3.4"
28+
- ruby: "4.0.0-preview2"
2929
job: stdlib_test
3030
rubyopt: "--enable-frozen-string-literal"
31-
- ruby: "3.4"
31+
- ruby: "4.0.0-preview2"
3232
job: rubocop validate test_doc build test_generate_stdlib raap
33-
- ruby: "3.4"
33+
- ruby: "4.0.0-preview2"
3434
job: typecheck_test
3535
env:
3636
RANDOMIZE_STDLIB_TEST_ORDER: "true"
@@ -94,7 +94,7 @@ jobs:
9494
strategy:
9595
fail-fast: false
9696
matrix:
97-
ruby: ['3.4', head]
97+
ruby: ['4.0.0-preview2', head]
9898
steps:
9999
- uses: actions/checkout@v4
100100
- name: Install dependencies

.github/workflows/typecheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: ruby/setup-ruby@v1
1818
with:
19-
ruby-version: "3.3"
19+
ruby-version: "3.4"
2020
bundler: none
2121
- name: Set working directory as safe
2222
run: git config --global --add safe.directory $(pwd)

.github/workflows/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
ruby: ['3.2', '3.3', ucrt, mswin]
16+
ruby: ['3.4', ucrt, mswin]
1717
steps:
1818
- uses: actions/checkout@v4
1919
- name: load ruby

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ gem "json-schema"
1616
gem "goodcheck"
1717
gem 'digest'
1818
gem 'tempfile'
19-
gem "rdoc", "~> 6.16"
19+
gem "rdoc", "~> 6.16.0"
2020
gem "fileutils"
2121
gem "raap"
2222
gem "activesupport", "~> 7.0"
2323
gem "extconf_compile_commands_json"
24+
gem "irb"
2425

2526
group :libs do
2627
# Libraries required for stdlib test
@@ -30,7 +31,6 @@ group :libs do
3031
gem "dbm"
3132
gem "mutex_m"
3233
gem "nkf"
33-
gem "pathname"
3434
end
3535

3636
group :profilers do

Gemfile.lock

Lines changed: 58 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ GEM
1313
remote: https://rubygems.org/
1414
specs:
1515
abbrev (0.1.2)
16-
activesupport (7.2.2.1)
16+
activesupport (7.2.3)
1717
base64
1818
benchmark (>= 0.3)
1919
bigdecimal
@@ -28,105 +28,116 @@ GEM
2828
addressable (2.8.7)
2929
public_suffix (>= 2.0.2, < 7.0)
3030
ast (2.4.3)
31-
base64 (0.2.0)
32-
benchmark (0.4.0)
31+
base64 (0.3.0)
32+
benchmark (0.5.0)
3333
benchmark-ips (2.14.0)
34-
bigdecimal (3.1.9)
34+
bigdecimal (3.3.1)
3535
concurrent-ruby (1.3.5)
36-
connection_pool (2.5.3)
37-
csv (3.3.4)
36+
connection_pool (2.5.5)
37+
csv (3.3.5)
3838
dbm (1.1.0)
39-
diff-lcs (1.6.1)
40-
digest (3.2.0)
41-
drb (2.2.1)
39+
diff-lcs (1.6.2)
40+
digest (3.2.1)
41+
drb (2.2.3)
42+
erb (6.0.0)
4243
extconf_compile_commands_json (0.0.7)
4344
ffi (1.17.2)
44-
fileutils (1.7.3)
45+
fileutils (1.8.0)
4546
goodcheck (3.1.0)
4647
marcel (>= 1.0, < 2.0)
4748
psych (>= 3.1, < 5.0)
4849
rainbow (>= 3.0, < 4.0)
4950
strong_json (>= 1.1, < 2.2)
5051
i18n (1.14.7)
5152
concurrent-ruby (~> 1.0)
53+
io-console (0.8.1)
54+
irb (1.15.3)
55+
pp (>= 0.6.0)
56+
rdoc (>= 4.0.0)
57+
reline (>= 0.4.2)
5258
json (2.10.2)
53-
json-schema (5.1.1)
59+
json-schema (6.0.0)
5460
addressable (~> 2.8)
5561
bigdecimal (~> 3.1)
56-
language_server-protocol (3.17.0.4)
62+
language_server-protocol (3.17.0.5)
5763
lint_roller (1.1.0)
5864
listen (3.9.0)
5965
rb-fsevent (~> 0.10, >= 0.10.3)
6066
rb-inotify (~> 0.9, >= 0.9.10)
6167
logger (1.7.0)
62-
marcel (1.0.4)
68+
marcel (1.1.0)
6369
memory_profiler (1.1.0)
64-
mini_portile2 (2.8.8)
65-
minitest (5.25.5)
70+
mini_portile2 (2.8.9)
71+
minitest (5.26.2)
6672
mutex_m (0.3.0)
6773
net-protocol (0.2.2)
6874
timeout
6975
net-smtp (0.5.1)
7076
net-protocol
7177
nkf (0.2.0)
72-
nokogiri (1.18.8)
78+
nokogiri (1.18.10)
7379
mini_portile2 (~> 2.8.2)
7480
racc (~> 1.4)
75-
ostruct (0.6.1)
81+
ostruct (0.6.3)
7682
parallel (1.27.0)
77-
parser (3.3.8.0)
83+
parser (3.3.10.0)
7884
ast (~> 2.4.1)
7985
racc
80-
pathname (0.4.0)
81-
power_assert (2.0.5)
82-
prism (1.4.0)
86+
power_assert (3.0.1)
87+
pp (0.6.3)
88+
prettyprint
89+
prettyprint (0.2.0)
90+
prism (1.6.0)
8391
pstore (0.2.0)
8492
psych (4.0.6)
8593
stringio
8694
public_suffix (6.0.2)
87-
raap (1.2.0)
88-
rbs (~> 3.0)
95+
raap (1.3.0)
96+
rbs (~> 3.9.0)
8997
timeout (~> 0.4)
9098
racc (1.8.1)
9199
rainbow (3.1.1)
92-
rake (13.2.1)
100+
rake (13.3.1)
93101
rake-compiler (1.3.0)
94102
rake
95103
rb-fsevent (0.11.2)
96104
rb-inotify (0.11.1)
97105
ffi (~> 1.0)
98-
rdoc (6.16.0)
106+
rdoc (6.16.1)
99107
erb
100108
psych (>= 4.0.0)
101-
regexp_parser (2.10.0)
102-
rspec (3.13.0)
109+
tsort
110+
regexp_parser (2.11.3)
111+
reline (0.6.3)
112+
io-console (~> 0.5)
113+
rspec (3.13.2)
103114
rspec-core (~> 3.13.0)
104115
rspec-expectations (~> 3.13.0)
105116
rspec-mocks (~> 3.13.0)
106-
rspec-core (3.13.3)
117+
rspec-core (3.13.6)
107118
rspec-support (~> 3.13.0)
108-
rspec-expectations (3.13.4)
119+
rspec-expectations (3.13.5)
109120
diff-lcs (>= 1.2.0, < 2.0)
110121
rspec-support (~> 3.13.0)
111-
rspec-mocks (3.13.4)
122+
rspec-mocks (3.13.7)
112123
diff-lcs (>= 1.2.0, < 2.0)
113124
rspec-support (~> 3.13.0)
114-
rspec-support (3.13.3)
115-
rubocop (1.75.5)
125+
rspec-support (3.13.6)
126+
rubocop (1.81.7)
116127
json (~> 2.3)
117128
language_server-protocol (~> 3.17.0.2)
118129
lint_roller (~> 1.1.0)
119130
parallel (~> 1.10)
120131
parser (>= 3.3.0.2)
121132
rainbow (>= 2.2.2, < 4.0)
122133
regexp_parser (>= 2.9.3, < 3.0)
123-
rubocop-ast (>= 1.44.0, < 2.0)
134+
rubocop-ast (>= 1.47.1, < 2.0)
124135
ruby-progressbar (~> 1.7)
125136
unicode-display_width (>= 2.4.0, < 4.0)
126-
rubocop-ast (1.44.1)
137+
rubocop-ast (1.48.0)
127138
parser (>= 3.3.7.2)
128139
prism (~> 1.4)
129-
rubocop-on-rbs (1.6.0)
140+
rubocop-on-rbs (1.8.0)
130141
lint_roller (~> 1.1)
131142
rbs (~> 3.5)
132143
rubocop (>= 1.72.1, < 2.0)
@@ -156,22 +167,23 @@ GEM
156167
strscan (>= 1.0.0)
157168
terminal-table (>= 2, < 5)
158169
uri (>= 0.12.0)
159-
stringio (3.1.7)
170+
stringio (3.1.8)
160171
strong_json (2.1.2)
161172
strscan (3.1.5)
162173
tempfile (0.3.1)
163174
terminal-table (4.0.0)
164175
unicode-display_width (>= 1.1.1, < 4)
165-
test-unit (3.6.8)
176+
test-unit (3.7.1)
166177
power_assert
167-
timeout (0.4.3)
178+
timeout (0.4.4)
179+
tsort (0.2.0)
168180
tzinfo (2.0.6)
169181
concurrent-ruby (~> 1.0)
170-
unicode-display_width (3.1.4)
171-
unicode-emoji (~> 4.0, >= 4.0.4)
172-
unicode-emoji (4.0.4)
173-
uri (1.0.3)
174-
zlib (3.2.1)
182+
unicode-display_width (3.2.0)
183+
unicode-emoji (~> 4.1)
184+
unicode-emoji (4.1.0)
185+
uri (1.1.1)
186+
zlib (3.2.2)
175187

176188
PLATFORMS
177189
ruby
@@ -188,6 +200,7 @@ DEPENDENCIES
188200
extconf_compile_commands_json
189201
fileutils
190202
goodcheck
203+
irb
191204
json (~> 2.10.2)
192205
json-schema
193206
memory_profiler
@@ -196,14 +209,13 @@ DEPENDENCIES
196209
net-smtp
197210
nkf
198211
ostruct
199-
pathname
200212
pstore
201213
raap
202214
rake
203215
rake-compiler
204216
rbs!
205217
rbs-amber!
206-
rdoc (~> 6.16)
218+
rdoc (~> 6.16.0)
207219
rspec
208220
rubocop
209221
rubocop-on-rbs
@@ -215,4 +227,4 @@ DEPENDENCIES
215227
test-unit
216228

217229
BUNDLED WITH
218-
2.6.3
230+
4.0.0.dev

Rakefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,14 @@ task :validate => :compile do
212212
end
213213

214214
libs.each do |lib|
215-
sh "#{ruby} #{rbs} -r #{lib} validate --exit-error-on-syntax-error"
215+
args = ["-r", lib]
216+
217+
if lib == "rbs"
218+
args << "-r"
219+
args << "prism"
220+
end
221+
222+
sh "#{ruby} #{rbs} #{args.join(' ')} validate --exit-error-on-syntax-error"
216223
end
217224
end
218225

bin/benchmark-parse.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require "rbs"
22
require "benchmark/ips"
33
require "csv"
4-
require "pathname"
54

65
files = {}
76
ARGV.each do |file|

core/encoding.rbs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,9 @@ class Encoding::Converter < Object
923923
# p ec.primitive_convert(src, dst, nil, 1) #=> :destination_buffer_full
924924
# p ec.last_error #=> nil
925925
#
926-
def last_error: () -> Encoding::InvalidByteSequenceError?
927-
| () -> Encoding::UndefinedConversionError?
926+
def last_error: () -> ( Encoding::InvalidByteSequenceError
927+
| Encoding::UndefinedConversionError
928+
| nil )
928929

929930
# <!--
930931
# rdoc-file=transcode.c

core/range.rbs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -936,8 +936,7 @@ class Range[out Elem] < Object
936936
#
937937
# Related: Range#count.
938938
#
939-
def size: () -> Integer?
940-
| () -> Float?
939+
def size: () -> (Integer | Float | nil)
941940

942941
# <!--
943942
# rdoc-file=range.c

0 commit comments

Comments
 (0)