@@ -2,6 +2,7 @@ class Ruby < Formula
2
2
desc "Powerful, clean, object-oriented scripting language"
3
3
homepage "https://www.ruby-lang.org/"
4
4
license "Ruby"
5
+ revision 1
5
6
head "https://github.com/ruby/ruby.git" , branch : "master"
6
7
7
8
stable do
@@ -22,6 +23,12 @@ class Ruby < Formula
22
23
regex ( /href=.*?rubygems[._-]v?(\d +(?:\. \d +)+)\. t/i )
23
24
end
24
25
end
26
+
27
+ # Update the bundled openssl gem for compatibility with OpenSSL 3.6+
28
+ resource "openssl" do
29
+ url "https://github.com/ruby/openssl/archive/refs/tags/v3.3.1.tar.gz"
30
+ sha256 "ca9b8f5940153e67b0d5e7e075ecd64b9d28b9f9b2f2c9f0748c1538734dfe10"
31
+ end
25
32
end
26
33
27
34
livecheck do
@@ -30,12 +37,12 @@ class Ruby < Formula
30
37
end
31
38
32
39
bottle do
33
- sha256 arm64_tahoe : "dfbb944f16f62a2ffe4d75e37d0e52d3ff895d5d65d58056a796c25cad6d85ec "
34
- sha256 arm64_sequoia : "8db26d72de0d97182fa05e1cc48f2e86ab03c040831f2087705fc94eb0d067a0 "
35
- sha256 arm64_sonoma : "e0690fb2ef65bc660808e8caf2cb73215c526fc9d0783256240d5c2425feb5a7 "
36
- sha256 sonoma : "3cb2e3f7f8a20f0ba7cff089b9b7c1755c656fc85f99fe8073fdd09d77b616f7 "
37
- sha256 arm64_linux : "0eb67642f5027acb33f304ab0ce165700216799dacba2cbb3ec53c71826cb329 "
38
- sha256 x86_64_linux : "3dd735f812a07714372bb07f13e4d3eb167bb9bcaf3a778124dd4dc508066cbf "
40
+ sha256 arm64_tahoe : "b23fa9e8a3e834fd1311063a4b8c264382132d9e549b77915bfc762955544ab9 "
41
+ sha256 arm64_sequoia : "edb4b658978898ceaf658590c52e0ab6824eed65e0cc021d7c52a69bc3a3b454 "
42
+ sha256 arm64_sonoma : "05cfda9be6ae9dc8eff1e06ebfaf167aaf57c86579ec3e4349b26510718b43e7 "
43
+ sha256 sonoma : "5dd22c214b23fffe46e21e20a9bbfcf20dacb63ebf25f744ae5bdeddfef559ff "
44
+ sha256 arm64_linux : "8cc1c5142162b37f64bd5d9dc33ec8247484b81ceac4b50f5b9f76530abe2ca0 "
45
+ sha256 x86_64_linux : "1001bf670e262052ce42d4d312afdaf439cbe58da9abf716897fb6ddc6aa24f0 "
39
46
end
40
47
41
48
keg_only :provided_by_macos
@@ -73,6 +80,17 @@ def rubygems_bindir
73
80
end
74
81
75
82
def install
83
+ if build . stable?
84
+ openssl_gem_version = File . read ( "ext/openssl/openssl.gemspec" ) [ /spec\. version\s *=\s *"(\d +(?:\. \d +)+)/ , 1 ]
85
+ odie "Remove openssl resource!" if Version . new ( openssl_gem_version ) >= "3.3.1"
86
+ rm_r ( %w[ ext/openssl test/openssl ] )
87
+ resource ( "openssl" ) . stage do
88
+ ( buildpath /"ext" ) . install "ext/openssl"
89
+ ( buildpath /"ext/openssl" ) . install "lib" , "History.md" , "openssl.gemspec"
90
+ ( buildpath /"test" ) . install "test/openssl"
91
+ end
92
+ end
93
+
76
94
# otherwise `gem` command breaks
77
95
ENV . delete ( "SDKROOT" )
78
96
0 commit comments