summaryrefslogtreecommitdiff
path: root/lib/ffi/library.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ffi/library.rb')
-rw-r--r--lib/ffi/library.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ffi/library.rb b/lib/ffi/library.rb
index 85406c1..a88e6f1 100644
--- a/lib/ffi/library.rb
+++ b/lib/ffi/library.rb
@@ -123,7 +123,8 @@ module FFI
end
# TODO better library lookup logic
- unless libname.to_s.start_with?("/")
+ libname = libname.to_s
+ unless libname.start_with?("/")
path = ['/usr/lib/','/usr/local/lib/'].find do |pth|
File.exist?(pth + libname)
end