lib/libmf.rb in libmf-0.2.1 vs lib/libmf.rb in libmf-0.2.2
- old
+ new
@@ -12,13 +12,15 @@
attr_accessor :ffi_lib
end
lib_name =
if Gem.win_platform?
"mf.dll"
- elsif RbConfig::CONFIG["arch"] =~ /arm64-darwin/i
- "libmf.arm64.dylib"
elsif RbConfig::CONFIG["host_os"] =~ /darwin/i
- "libmf.dylib"
+ if RbConfig::CONFIG["host_cpu"] =~ /arm/i
+ "libmf.arm64.dylib"
+ else
+ "libmf.dylib"
+ end
else
"libmf.so"
end
vendor_lib = File.expand_path("../vendor/#{lib_name}", __dir__)
self.ffi_lib = [vendor_lib]