diff --git a/lib/vips.rb b/lib/vips.rb index 425797b..5f8ade6 100644 --- a/lib/vips.rb +++ b/lib/vips.rb @@ -30,13 +30,13 @@ def library_name(name, abi_number) # check if the GLib DLLs are available. If these can not be found, we # assume that GLib is statically linked into libvips. begin - lib = FFI::DynamicLibrary.open("lib#{name}-#{abi_number}.dll", + lib = FFI::DynamicLibrary.open("lib#{name}-#{abi_number}.dll", FFI::DynamicLibrary::RTLD_LAZY | FFI::DynamicLibrary::RTLD_LOCAL) - return lib if lib + lib if lib # LoadError for JRuby, RuntimeError for TruffleRuby rescue LoadError, RuntimeError - return "libvips-42.dll" + "libvips-42.dll" end # macOS and *nix uses `dlsym()`, which also searches for named symbols