Skip to content

Commit 1747391

Browse files
committed
[GR-20446] Fix Kernel#require specs on macOS 13 Ventura
PullRequest: truffleruby/4033
2 parents 63ff781 + fbea74f commit 1747391

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/ruby/core/kernel/shared/require.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,17 @@
221221

222222
platform_is :linux, :darwin do
223223
it "loads c-extension file when passed absolute path without extension when no .rb is present" do
224+
# the error message is specific to what dlerror() returns
224225
path = File.join CODE_LOADING_DIR, "a", "load_fixture"
225-
-> { @object.send(@method, path) }.should raise_error(Exception, /file too short/)
226+
-> { @object.send(@method, path) }.should raise_error(Exception, /file too short|not a mach-o file/)
226227
end
227228
end
228229

229230
platform_is :darwin do
230231
it "loads .bundle file when passed absolute path with .so" do
232+
# the error message is specific to what dlerror() returns
231233
path = File.join CODE_LOADING_DIR, "a", "load_fixture.so"
232-
-> { @object.send(@method, path) }.should raise_error(Exception, /load_fixture\.bundle.+file too short/)
234+
-> { @object.send(@method, path) }.should raise_error(Exception, /load_fixture\.bundle.+(file too short|not a mach-o file)/)
233235
end
234236
end
235237

0 commit comments

Comments
 (0)