Skip to content

Commit 6eab868

Browse files
p-linnaneBo98
andcommitted
Portable Ruby 4.0.1
Co-authored-by: Bo Anderson <mail@boanderson.me>
1 parent 0ac3954 commit 6eab868

File tree

335 files changed

+41
-44
lines changed

Some content is hidden

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

335 files changed

+41
-44
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# Ignore Ruby gems for versions other than we explicitly vendor.
4141
# Keep this in sync with the list in standalone/init.rb.
4242
**/vendor/bundle/ruby/*/
43-
!**/vendor/bundle/ruby/3.4.0/
43+
!**/vendor/bundle/ruby/4.0.0/
4444

4545
# Ignore Bundler binary files
4646
**/vendor/bundle/ruby/*/gems/**/*.bundle

Library/.rubocop.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ inherit_mode:
2020
- Exclude
2121

2222
AllCops:
23+
# Only bump this after the first tagged brew release with a new Ruby version,
24+
# otherwise taps will be prompted to use newer Ruby syntax too early.
2325
TargetRubyVersion: 3.4
2426
NewCops: enable
2527
Include:

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: 2 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)

Library/Homebrew/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ DEPENDENCIES
228228
yard-sorbet
229229

230230
RUBY VERSION
231-
ruby 3.4.8p72
231+
ruby 4.0.1
232232

233233
BUNDLED WITH
234-
2.6.9
234+
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/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) }

Library/Homebrew/standalone/init.rb

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

2222
# This list should match .gitignore
23-
vendored_versions = ["3.4"].freeze
23+
vendored_versions = ["4.0"].freeze
2424
vendored_versions.include?("#{ruby_major}.#{ruby_minor}")
2525
end.freeze
2626

0 commit comments

Comments
 (0)