lib/blingfire.rb in blingfire-0.1.4 vs lib/blingfire.rb in blingfire-0.1.5

- old
+ new

@@ -12,15 +12,21 @@ attr_accessor :ffi_lib end lib_name = if Gem.win_platform? "blingfiretokdll.dll" - elsif RbConfig::CONFIG["arch"] =~ /arm64-darwin/i - "libblingfiretokdll.arm64.dylib" elsif RbConfig::CONFIG["host_os"] =~ /darwin/i - "libblingfiretokdll.dylib" + if RbConfig::CONFIG["host_cpu"] =~ /arm/i + "libblingfiretokdll.arm64.dylib" + else + "libblingfiretokdll.dylib" + end else - "libblingfiretokdll.so" + if RbConfig::CONFIG["host_cpu"] =~ /aarch64/i + "libblingfiretokdll.arm64.so" + else + "libblingfiretokdll.so" + end end vendor_lib = File.expand_path("../vendor/#{lib_name}", __dir__) self.ffi_lib = [vendor_lib] # friendlier error message