Skip to content

Commit

Permalink
[GR-20446] Fix Kernel#require specs on macOS 13 Ventura
Browse files Browse the repository at this point in the history
PullRequest: truffleruby/4033
  • Loading branch information
andrykonchin committed Oct 17, 2023
2 parents 63ff781 + fbea74f commit 1747391
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/ruby/core/kernel/shared/require.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,17 @@

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

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

Expand Down

0 comments on commit 1747391

Please sign in to comment.