From cd262ab29b3320463c191b7b8da63a90c4c62a6d Mon Sep 17 00:00:00 2001 From: David Zhang Date: Thu, 10 Feb 2022 09:02:11 -0500 Subject: [PATCH] move opt/homebrew/lib ahead of /usr/local/lib --- lib/ffi/library.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ffi/library.rb b/lib/ffi/library.rb index 43b2bfe15..b1d3f7e76 100644 --- a/lib/ffi/library.rb +++ b/lib/ffi/library.rb @@ -126,7 +126,7 @@ def ffi_lib(*names) else # TODO better library lookup logic unless libname.start_with?("/") || FFI::Platform.windows? - path = ['/usr/lib/','/usr/local/lib/','/opt/local/lib/', '/opt/homebrew/lib/'].find do |pth| + path = ['/usr/lib/','/opt/homebrew/lib/', '/usr/local/lib/','/opt/local/lib/'].find do |pth| File.exist?(pth + libname) end if path