Skip to content

Commit 68dd986

Browse files
committed
Portable Ruby 4.0.1
1 parent 26fb7f8 commit 68dd986

File tree

17 files changed

+76
-31
lines changed

17 files changed

+76
-31
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: vale docs/
5454

5555
- name: Install Ruby
56-
uses: ruby/setup-ruby@f8d7259c7a66155a7c4a157a1a10ca601f186594 # v1.271.0
56+
uses: ruby/setup-ruby@90be1154f987f4dc0fe0dd0feedac9e473aa4ba8 # v1.286.0
5757
with:
5858
bundler-cache: true
5959
working-directory: docs

Library/.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ inherit_mode:
2020
- Exclude
2121

2222
AllCops:
23-
TargetRubyVersion: 3.4
23+
TargetRubyVersion: 4.0
2424
NewCops: enable
2525
Include:
2626
- "**/*.rbi"

Library/Homebrew/.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.8
1+
4.0.1

Library/Homebrew/Gemfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ source "https://rubygems.org"
55
# The default case (no envs), should always be a restrictive bound on the lowest supported minor version.
66
# This is the branch that Dependabot will use.
77
if ENV.fetch("HOMEBREW_USE_RUBY_FROM_PATH", "").empty?
8-
ruby "~> 3.4.0"
8+
ruby "~> 4.0.0"
99
else
10-
ruby ">= 3.4.0"
10+
ruby ">= 4.0.0"
1111
end
1212

1313
# disallowed gems (should not be used)
@@ -26,6 +26,9 @@ end
2626
group :formula_test, optional: true do
2727
gem "minitest", require: false
2828
end
29+
group :irb, optional: true do
30+
gem "irb", require: false
31+
end
2932
group :livecheck, optional: true do
3033
gem "ruby-progressbar", require: false
3134
end
@@ -54,6 +57,7 @@ group :style, :tests, optional: true do
5457
gem "test-prof", require: false
5558
end
5659
group :tests, optional: true do
60+
gem "ostruct", require: false
5761
gem "parallel_tests", require: false
5862
gem "rspec", require: false
5963
gem "rspec-core", require: false

Library/Homebrew/Gemfile.lock

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,19 @@ GEM
1111
coderay (1.1.3)
1212
concurrent-ruby (1.3.6)
1313
csv (3.3.5)
14+
date (3.5.1)
1415
diff-lcs (1.6.2)
1516
docile (1.4.1)
1617
elftools (1.3.1)
1718
bindata (~> 2)
19+
erb (6.0.1)
1820
erubi (1.13.1)
1921
hana (1.3.7)
2022
io-console (0.8.2)
23+
irb (1.16.0)
24+
pp (>= 0.6.0)
25+
rdoc (>= 4.0.0)
26+
reline (>= 0.4.2)
2127
json (2.18.0)
2228
json_schemer (2.5.0)
2329
bigdecimal
@@ -33,6 +39,7 @@ GEM
3339
minitest (6.0.1)
3440
prism (~> 1.5)
3541
netrc (0.11.0)
42+
ostruct (0.6.3)
3643
parallel (1.27.0)
3744
parallel_tests (5.5.0)
3845
parallel
@@ -43,11 +50,17 @@ GEM
4350
elftools (>= 1.3)
4451
logger (~> 1)
4552
plist (3.7.2)
53+
pp (0.6.3)
54+
prettyprint
55+
prettyprint (0.2.0)
4656
prism (1.8.0)
4757
pry (0.16.0)
4858
coderay (~> 1.1)
4959
method_source (~> 1.0)
5060
reline (>= 0.6.0)
61+
psych (5.3.1)
62+
date
63+
stringio
5164
public_suffix (7.0.2)
5265
pycall (1.5.2)
5366
racc (1.8.1)
@@ -59,6 +72,10 @@ GEM
5972
logger
6073
prism (>= 1.3.0)
6174
tsort
75+
rdoc (7.1.0)
76+
erb
77+
psych (>= 4.0.0)
78+
tsort
6279
redcarpet (3.6.1)
6380
regexp_parser (2.11.3)
6481
reline (0.6.3)
@@ -149,6 +166,7 @@ GEM
149166
sorbet-static-and-runtime (>= 0.5.10187)
150167
thor (>= 0.19.2)
151168
stackprof (0.2.27)
169+
stringio (3.2.0)
152170
tapioca (0.17.10)
153171
benchmark
154172
bundler (>= 2.2.25)
@@ -184,10 +202,12 @@ DEPENDENCIES
184202
base64
185203
concurrent-ruby
186204
csv
205+
irb
187206
json_schemer
188207
kramdown
189208
method_source
190209
minitest
210+
ostruct
191211
parallel_tests
192212
patchelf
193213
plist
@@ -226,7 +246,7 @@ DEPENDENCIES
226246
yard-sorbet
227247

228248
RUBY VERSION
229-
ruby 3.4.8p72
249+
ruby 4.0.1
230250

231251
BUNDLED WITH
232-
2.6.9
252+
4.0.3

Library/Homebrew/bundle/dumper.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# frozen_string_literal: true
33

44
require "fileutils"
5-
require "pathname"
65

76
module Homebrew
87
module Bundle

Library/Homebrew/dev-cmd/irb.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def run
7373
Homebrew.install_bundler_gems!(groups: ["pry"])
7474
require "pry"
7575
else
76+
Homebrew.install_bundler_gems!(groups: ["irb"])
7677
require "irb"
7778
end
7879

Library/Homebrew/extend/os/mac/linkage_checker.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ def system_libraries_exist_in_cache?
1111
# In macOS Big Sur and later, system libraries do not exist on-disk and instead exist in a cache.
1212
MacOS.version >= :big_sur
1313
end
14+
15+
sig { params(dylib: String).returns(T::Boolean) }
16+
def dylib_found_in_shared_cache?(dylib)
17+
Kernel.require "fiddle"
18+
@dyld_shared_cache_contains_path ||= T.let(begin
19+
libc = Fiddle.dlopen("/usr/lib/libSystem.B.dylib")
20+
21+
Fiddle::Function.new(
22+
libc["_dyld_shared_cache_contains_path"],
23+
[Fiddle::TYPE_CONST_STRING],
24+
Fiddle::TYPE_BOOL,
25+
)
26+
end, T.nilable(Fiddle::Function))
27+
28+
@dyld_shared_cache_contains_path.call(dylib)
29+
end
1430
end
1531
end
1632
end

Library/Homebrew/linkage_checker.rb

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -232,20 +232,9 @@ def system_libraries_exist_in_cache?
232232
false
233233
end
234234

235-
sig { params(dylib: String).returns(T::Boolean) }
236-
def dylib_found_in_shared_cache?(dylib)
237-
require "fiddle"
238-
@dyld_shared_cache_contains_path ||= T.let(begin
239-
libc = Fiddle.dlopen("/usr/lib/libSystem.B.dylib")
240-
241-
Fiddle::Function.new(
242-
libc["_dyld_shared_cache_contains_path"],
243-
[Fiddle::TYPE_CONST_STRING],
244-
Fiddle::TYPE_BOOL,
245-
)
246-
end, T.nilable(Fiddle::Function))
247-
248-
@dyld_shared_cache_contains_path.call(dylib)
235+
sig { params(_dylib: String).returns(T::Boolean) }
236+
def dylib_found_in_shared_cache?(_dylib)
237+
false
249238
end
250239

251240
sig {

Library/Homebrew/sorbet/tapioca/require.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
next if name == "sorbet-static"
2424
next if name == "sorbet-static-and-runtime"
2525

26+
# We don't generate RBIs for pycall
27+
next if name == "pycall"
28+
2629
name = dependency_require_map[name] if dependency_require_map.key?(name)
2730
require name
2831
additional_requires_map[name]&.each { require(it) }

0 commit comments

Comments
 (0)