Allow ruby bindings on arm64

While fixing the gem build, I noticed that the gem will not run on arm64
machines, like the new spiffy M1/M2 MacBooks. On a whim, I tried just
removing that restriction... and it does seem to work:

```
foundationdb/bindings/ruby/lib on  ahayworth/fix-ruby-binding-build [?] via 💎 v3.2.1 took 2s
zsh ❯ pry
[1] pry(main)> require 'fdb'
=> true
[2] pry(main)> FDB.api_version 720
LoadError: FoundationDB API only supported on x86_64 (not arm64)
from /Users/andrew/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/fdb-7.3.0/lib/fdbimpl.rb:40:in `<module:FDBC>'
[3] pry(main)>
```
This commit is contained in:
Andrew Hayworth 2023-02-23 21:46:24 -06:00 committed by Xiaoge Su
parent 684464cebb
commit 55d12fe1fc
1 changed files with 2 additions and 2 deletions

View File

@ -36,8 +36,8 @@ module FDB
module FDBC
require 'rbconfig'
if RbConfig::CONFIG['host_cpu'] != "x86_64"
raise LoadError, "FoundationDB API only supported on x86_64 (not #{RbConfig::CONFIG['host_cpu']})"
unless ["x86_64", "arm64"].include? RbConfig::CONFIG['host_cpu']
raise LoadError, "FoundationDB API only supported on x86_64 and arm64 (not #{RbConfig::CONFIG['host_cpu']})"
end
case RbConfig::CONFIG['host_os']