diff options
-rw-r--r-- | spec/ruby/core/kernel/shared/require.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/kernel/shared/require.rb b/spec/ruby/core/kernel/shared/require.rb index 250813191b..080409117f 100644 --- a/spec/ruby/core/kernel/shared/require.rb +++ b/spec/ruby/core/kernel/shared/require.rb @@ -223,7 +223,7 @@ describe :kernel_require, shared: true 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|not a mach-o file/) + -> { @object.send(@method, path) }.should raise_error(Exception, /file too short|not a mach-o file|slice is not valid mach-o file/) end end @@ -231,7 +231,7 @@ describe :kernel_require, shared: true 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|not a mach-o file)/) + -> { @object.send(@method, path) }.should raise_error(Exception, /load_fixture\.bundle.+(file too short|not a mach-o file|slice is not valid mach-o file)/) end end |