File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
spec/ruby/core/kernel/shared Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 221
221
222
222
platform_is :linux , :darwin do
223
223
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
224
225
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 / )
226
227
end
227
228
end
228
229
229
230
platform_is :darwin do
230
231
it "loads .bundle file when passed absolute path with .so" do
232
+ # the error message is specific to what dlerror() returns
231
233
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) / )
233
235
end
234
236
end
235
237
You can’t perform that action at this time.
0 commit comments